From 15dd189e1b73e2a638804cec8ff88751d395e1c0 Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Thu, 13 Dec 2012 13:57:59 +0100 Subject: Template manager: slightly smaller items to show more of them Change-Id: I43aa0655fb46729747829f7e6ef111efc8df90f7 --- sfx2/inc/sfx2/templateabstractview.hxx | 7 +++---- sfx2/inc/sfx2/thumbnailview.hxx | 4 ---- sfx2/source/control/thumbnailview.cxx | 17 ----------------- sfx2/source/doc/templatedlg.cxx | 3 --- 4 files changed, 3 insertions(+), 28 deletions(-) (limited to 'sfx2') diff --git a/sfx2/inc/sfx2/templateabstractview.hxx b/sfx2/inc/sfx2/templateabstractview.hxx index 8dd3c2833535..d1e4b140cd5a 100644 --- a/sfx2/inc/sfx2/templateabstractview.hxx +++ b/sfx2/inc/sfx2/templateabstractview.hxx @@ -13,15 +13,14 @@ #include //template thumbnail item defines -#define TEMPLATE_ITEM_MAX_WIDTH 192 +#define TEMPLATE_ITEM_MAX_WIDTH 160 #define TEMPLATE_ITEM_MAX_HEIGHT 160 #define TEMPLATE_ITEM_PADDING 5 -#define TEMPLATE_ITEM_SPACE 30 #define TEMPLATE_ITEM_MAX_TEXT_LENGTH 20 -#define TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT 128 +#define TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT 88 //template thumbnail image defines -#define TEMPLATE_THUMBNAIL_MAX_HEIGHT 128 - 2*TEMPLATE_ITEM_PADDING +#define TEMPLATE_THUMBNAIL_MAX_HEIGHT TEMPLATE_ITEM_THUMBNAIL_MAX_HEIGHT - 2*TEMPLATE_ITEM_PADDING #define TEMPLATE_THUMBNAIL_MAX_WIDTH TEMPLATE_ITEM_MAX_WIDTH - 2*TEMPLATE_ITEM_PADDING class TemplateView; diff --git a/sfx2/inc/sfx2/thumbnailview.hxx b/sfx2/inc/sfx2/thumbnailview.hxx index 6ebe23f2ddec..6d3a4c2869fc 100644 --- a/sfx2/inc/sfx2/thumbnailview.hxx +++ b/sfx2/inc/sfx2/thumbnailview.hxx @@ -227,10 +227,6 @@ public: bool IsColor() const { return maColor.GetTransparency() == 0; } - Size CalcWindowSizePixel(sal_uInt16 nCalcCols, sal_uInt16 nCalcLines, - sal_uInt16 nItemWidth, sal_uInt16 nItemHeight, - sal_uInt16 nItemSpace); - long GetScrollWidth() const; void filterItems (const boost::function &func); diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index db8d6261da8f..06942e522f43 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -945,23 +945,6 @@ bool ThumbnailView::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) return true; } -Size ThumbnailView::CalcWindowSizePixel (sal_uInt16 nCols, sal_uInt16 nLines, - sal_uInt16 nItemWidth, sal_uInt16 nItemHeight, - sal_uInt16 nItemSpace) -{ - Size aSize(nItemWidth*nCols, nItemHeight*nLines); - - aSize.Width() += nItemSpace*(nCols+1); - aSize.Height() += nItemSpace*(nLines+1); - - aSize.Height() += mnHeaderHeight; - - // sum possible ScrollBar width - aSize.Width() += GetScrollWidth(); - - return aSize; -} - long ThumbnailView::GetScrollWidth() const { if ( GetStyle() & WB_VSCROLL ) diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index e540b0dcdd29..1d0512e66527 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -51,9 +51,6 @@ #include "doc.hrc" #include "templatedlg.hrc" -#define INIT_FOLDER_COLS 3 -#define INIT_FOLDER_LINES 2 - #define PADDING_DLG_BORDER 10 using namespace ::com::sun::star; -- cgit