From 729bc005ec12cdb1c8cb319a60bdccc3b0964c85 Mon Sep 17 00:00:00 2001 From: Krisztian Pinter Date: Fri, 30 Aug 2013 16:55:53 +0200 Subject: startcenter: Tweak button layout in Start Center Change-Id: I7a02b5c831b268f326d30c331065c57deceeb6ee --- sfx2/source/dialog/backingwindow.cxx | 48 +++--- sfx2/source/dialog/backingwindow.hxx | 3 +- sfx2/uiconfig/ui/startcenter.ui | 304 +++++++++++++++-------------------- 3 files changed, 158 insertions(+), 197 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 4cedf1b9352b..1ce82d8aa1aa 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -277,25 +277,14 @@ void BackingWindow::initControls() setupExternalLink( mpInfoButton ); setupExternalLink( mpTplRepButton ); - mpShowWriterTemplateButton ->SetClickHdl( LINK( this, BackingWindow, RecentTemplateToggleHdl ) ); - mpShowCalcTemplateButton ->SetClickHdl( LINK( this, BackingWindow, RecentTemplateToggleHdl ) ); - mpShowImpressTemplateButton ->SetClickHdl( LINK( this, BackingWindow, RecentTemplateToggleHdl ) ); - mpShowDrawTemplateButton ->SetClickHdl( LINK( this, BackingWindow, RecentTemplateToggleHdl ) ); - - mpShowWriterRecentButton ->SetClickHdl( LINK( this, BackingWindow, RecentTemplateToggleHdl ) ); - mpShowCalcRecentButton ->SetClickHdl( LINK( this, BackingWindow, RecentTemplateToggleHdl ) ); - mpShowImpressRecentButton ->SetClickHdl( LINK( this, BackingWindow, RecentTemplateToggleHdl ) ); - mpShowDrawRecentButton ->SetClickHdl( LINK( this, BackingWindow, RecentTemplateToggleHdl ) ); - - mpShowWriterRecentButton ->Hide(); - mpShowCalcRecentButton ->Hide(); - mpShowImpressRecentButton ->Hide(); - mpShowDrawRecentButton ->Hide(); - - setupTemplateView( mpWriterTemplateThumbnails, FILTER_APP_WRITER ); - setupTemplateView( mpCalcTemplateThumbnails, FILTER_APP_CALC ); - setupTemplateView( mpImpressTemplateThumbnails, FILTER_APP_IMPRESS ); - setupTemplateView( mpDrawTemplateThumbnails, FILTER_APP_DRAW ); + setupTemplateView( mpWriterTemplateThumbnails, FILTER_APP_WRITER, + mpShowWriterRecentButton, mpShowWriterTemplateButton ); + setupTemplateView( mpCalcTemplateThumbnails, FILTER_APP_CALC, + mpShowCalcRecentButton, mpShowCalcTemplateButton ); + setupTemplateView( mpImpressTemplateThumbnails, FILTER_APP_IMPRESS, + mpShowImpressRecentButton, mpShowImpressTemplateButton ); + setupTemplateView( mpDrawTemplateThumbnails, FILTER_APP_DRAW, + mpShowDrawRecentButton, mpShowDrawTemplateButton ); Resize(); } @@ -331,8 +320,10 @@ void BackingWindow::setupButton( PushButton* pButton ) pButton->SetControlFont( aFont ); } -void BackingWindow::setupTemplateView( TemplateLocalView* pView, FILTER_APPLICATION eFilter ) +void BackingWindow::setupTemplateView( TemplateLocalView* pView, FILTER_APPLICATION eFilter, + PushButton* pRecentButton, PushButton* pTemplateButton ) { + // setup view pView->SetStyle(pView->GetStyle() | WB_VSCROLL); pView->setItemMaxTextLength(nTemplateItemMaxTextLength); @@ -343,6 +334,23 @@ void BackingWindow::setupTemplateView( TemplateLocalView* pView, FILTER_APPLICAT pView->Hide(); // hidden by default pView->showRootRegion(); pView->setOpenTemplateHdl( LINK( this, BackingWindow, OpenTemplateHdl ) ); + + // setup buttons + pRecentButton->SetClickHdl( LINK( this, BackingWindow, RecentTemplateToggleHdl ) ); + pTemplateButton->SetClickHdl( LINK( this, BackingWindow, RecentTemplateToggleHdl ) ); + + // button text - slighly larger font than normal labels on the texts + Font aFont; + aFont.SetSize( Size( 0, 11 ) ); + aFont.SetWeight( WEIGHT_NORMAL ); + + pRecentButton->SetFont( aFont ); + pRecentButton->SetControlFont( aFont ); + + pTemplateButton->SetFont( aFont ); + pTemplateButton->SetControlFont( aFont ); + + pRecentButton->Hide(); // hidden by default } void BackingWindow::setupExternalLink( PushButton* pButton ) diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index 5009df88b37e..1da5a9a5a6b3 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -107,7 +107,8 @@ class BackingWindow const OUString& rURL, const std::set& rURLS, SvtModuleOptions& rOpt, SvtModuleOptions::EModule eMod ); void setupButton( PushButton* pButton ); - void setupTemplateView( TemplateLocalView* pView, FILTER_APPLICATION eFilter ); + void setupTemplateView( TemplateLocalView* pView, FILTER_APPLICATION eFilter, + PushButton* pRecentButton, PushButton* pTemplateButton ); void setupExternalLink( PushButton* pButton ); void dispatchURL( const OUString& i_rURL, diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui index 9285bf92b793..c3a985026a50 100644 --- a/sfx2/uiconfig/ui/startcenter.ui +++ b/sfx2/uiconfig/ui/startcenter.ui @@ -17,41 +17,25 @@ False res/ods_32_8.png - - True - False - res/odb_32_8.png - True False res/odb_32_8.png - + True False - res/odg_32_8.png + res/odb_32_8.png True False res/odg_32_8.png - - True - False - framework/res/extension.png - - - True - False - New Presentation - res/odp_32_8.png - - + True False - framework/res/info_26.png + res/odg_32_8.png False @@ -218,6 +202,7 @@ True False + 12 New Document @@ -234,21 +219,8 @@ - - True - False - True - - - 1 - 0 - 1 - 1 - - - - - Show Templates + + Show Recent True True True @@ -261,14 +233,14 @@ - - Show Recent + + Show Templates True True True - 3 + 1 0 1 1 @@ -351,6 +323,7 @@ True False + 12 New Spreadsheet @@ -366,19 +339,6 @@ 1 - - - True - False - True - - - 1 - 0 - 1 - 1 - - Show Templates @@ -387,7 +347,7 @@ True - 2 + 1 0 1 1 @@ -401,7 +361,7 @@ True - 3 + 2 0 1 1 @@ -484,6 +444,7 @@ True False + 12 New Presentation @@ -499,19 +460,6 @@ 1 - - - True - False - True - - - 1 - 0 - 1 - 1 - - Show Templates @@ -520,7 +468,7 @@ True - 2 + 1 0 1 1 @@ -534,7 +482,7 @@ True - 3 + 2 0 1 1 @@ -617,6 +565,7 @@ True False + 12 New Drawing @@ -632,19 +581,6 @@ 1 - - - True - False - True - - - 1 - 0 - 1 - 1 - - Show Templates @@ -653,7 +589,7 @@ True - 2 + 1 0 1 1 @@ -667,7 +603,7 @@ True - 3 + 2 0 1 1 @@ -868,52 +804,6 @@ - - 0 - 2 - 1 - 1 - - - - - True - False - True - 12 - 12 - True - - - Open - True - True - True - open_image - - - 0 - 0 - 1 - 1 - - - - - Templates - True - True - True - templates_image - - - 1 - 0 - 1 - 1 - - - 0 1 @@ -929,74 +819,120 @@ 12 12 - - True - True - True - Get more information about %PRODUCTNAME - info_image - none - - - 4 - 0 - 1 - 1 - - - - - True - True - True - Add new features to %PRODUCTNAME - extension_image - none - - - 3 - 0 - 1 - 1 - - - - + True - True - True - Get more templates for %PRODUCTNAME - add_temp_image - none + False + True - 2 + 1 0 1 1 - + True False - True + sfx2/res/startcenter-logo.png - 1 + 0 0 1 1 - + True False - sfx2/res/startcenter-logo.png + 12 + + + Open + True + True + True + open_image + + + 0 + 0 + 1 + 1 + + + + + Templates + True + True + True + templates_image + + + 1 + 0 + 1 + 1 + + + + + True + True + True + True + Get more templates for %PRODUCTNAME + Get more templates for %PRODUCTNAME + add_temp_image + + + 2 + 0 + 1 + 1 + + + + + True + True + True + True + Add new features to %PRODUCTNAME + Add new features to %PRODUCTNAME + extension_image + + + 3 + 0 + 1 + 1 + + + + + True + True + True + True + Get more information about %PRODUCTNAME + Get more information about %PRODUCTNAME + info_image + + + 4 + 0 + 1 + 1 + + - 0 + 2 0 1 1 @@ -1018,11 +954,27 @@ + + True + False + framework/res/extension.png + + + True + False + New Presentation + res/odp_32_8.png + True False res/odp_32_8.png + + True + False + framework/res/info_26.png + True False @@ -1043,12 +995,12 @@ False framework/res/templates_32.png - + True False res/odt_32_8.png - + True False res/odt_32_8.png -- cgit v1.2.1