diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-12-06 13:30:12 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-12-10 16:11:56 +0100 |
commit | 35a19a8f048d282bf5389e9497f89d2b9dba1fe6 (patch) | |
tree | 180347a51ec6926013d211be17e3ce056228f75d /sfx2/source | |
parent | 9fe54eda44769b38ab0c149abcdc6a12ae187280 (diff) |
Template manager: white background for the thumbnail view
Change-Id: Ie5497713b83da23801f58f4c6d990e28042a3df9
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/control/templatelocalview.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.src | 2 |
4 files changed, 9 insertions, 18 deletions
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index 582e508406cd..15e3b8dfa99d 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -106,7 +106,7 @@ TemplateLocalView::TemplateLocalView ( Window* pParent, const ResId& rResId, boo meFilterOption(FILTER_APP_NONE), mpDocTemplates(new SfxDocumentTemplates) { - mpItemView->SetColor(Color(COL_WHITE)); + mpItemView->SetColor(GetSettings().GetStyleSettings().GetFieldColor()); mpItemView->setChangeNameHdl(LINK(this,TemplateLocalView,ChangeNameHdl)); } @@ -716,7 +716,7 @@ void TemplateLocalView::OnItemClicked (ThumbnailViewItem *pRegionItem) mpItemView->filterItems(ViewFilter_Application(meFilterOption)); - mpItemView->Show(); + showOverlay(true); } IMPL_LINK(TemplateLocalView, ChangeNameHdl, TemplateView*, pView) diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index e51385a63913..32571b78d07a 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -100,7 +100,7 @@ void ThumbnailView::ImplInit() mbHasVisibleItems = false; mbSelectionMode = false; maFilterFunc = ViewFilterAll(); - maColor = GetSettings().GetStyleSettings().GetDialogColor(); + maColor = GetSettings().GetStyleSettings().GetFieldColor(); // Create the processor and process the primitives const drawinglayer::geometry::ViewInformation2D aNewViewInfos; @@ -156,14 +156,11 @@ void ThumbnailView::ImplInitSettings( bool bFont, bool bForeground, bool bBackgr if ( bBackground ) { - Color aColor; - if ( IsControlBackground() ) - aColor = GetControlBackground(); - else - aColor = rStyleSettings.GetFaceColor(); + Color aColor = rStyleSettings.GetFieldColor(); SetBackground( aColor ); } + mpItemAttrs = new ThumbnailItemAttributes; mpItemAttrs->aFillColor = maColor.getBColor(); mpItemAttrs->aHighlightColor = rStyleSettings.GetHighlightColor().getBColor(); diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index b4fb512916ed..29904409964f 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -135,13 +135,6 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent) Size aWinSize = GetOutputSize(); - // Calculate thumbnail view minimum size - Size aThumbSize = maView->CalcWindowSizePixel(INIT_FOLDER_COLS,INIT_FOLDER_LINES, - TEMPLATE_ITEM_MAX_WIDTH,TEMPLATE_ITEM_MAX_HEIGHT,TEMPLATE_ITEM_SPACE); - - if (aWinSize.getWidth() < aThumbSize.getWidth() + 2*PADDING_DLG_BORDER) - aWinSize.setWidth(aThumbSize.getWidth() + 2*PADDING_DLG_BORDER); - // Calculate toolboxs size and positions Size aViewSize = mpViewBar->CalcMinimumWindowSizePixel(); Size aActionSize = mpActionBar->CalcMinimumWindowSizePixel(); @@ -178,8 +171,9 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent) // Set view position below toolbox Point aViewPos = maView->GetPosPixel(); aViewPos.setY(mpToolbars->GetPosPixel().Y() + mpToolbars->GetSizePixel().getHeight()); - aViewPos.setX((aWinSize.getWidth() - aThumbSize.getWidth())/2); // Center the view - maView->SetPosPixel(aViewPos); + aViewPos.setX(0); + Size aThumbSize(aWinSize.getWidth(), aWinSize.getHeight() - aViewPos.getY()); + maView->SetPosSizePixel(aViewPos, aThumbSize); if (aWinSize.getHeight() < aViewPos.getY() + aThumbSize.getHeight() + PADDING_DLG_BORDER) aWinSize.setHeight(aViewPos.getY() + aThumbSize.getHeight() + PADDING_DLG_BORDER); diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src index 184b2165accb..61fe2b8336b0 100644 --- a/sfx2/source/doc/templatedlg.src +++ b/sfx2/source/doc/templatedlg.src @@ -192,7 +192,7 @@ ModelessDialog DLG_TEMPLATE_MANAGER Control TOOLBARS { Pos = MAP_APPFONT( 0 , 22 ); - Size = MAP_APPFONT( 290 , 20 ); + Size = MAP_APPFONT( 290 , 15 ); TabStop = False; }; |