summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrisztian Pinter <pin.terminator@gmail.com>2013-08-30 16:55:53 +0200
committerKrisztian Pinter <pin.terminator@gmail.com>2013-08-30 17:12:35 +0200
commit729bc005ec12cdb1c8cb319a60bdccc3b0964c85 (patch)
tree35571633dee379f8b6cfd30c1d58c86712c6b259
parentdd0f6c737b6af659389e473296e939ec6cfa5f4e (diff)
startcenter: Tweak button layout in Start Center
Change-Id: I7a02b5c831b268f326d30c331065c57deceeb6ee
-rw-r--r--sfx2/source/dialog/backingwindow.cxx48
-rw-r--r--sfx2/source/dialog/backingwindow.hxx3
-rw-r--r--sfx2/uiconfig/ui/startcenter.ui304
3 files changed, 158 insertions, 197 deletions
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<OUString>& 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 @@
<property name="can_focus">False</property>
<property name="pixbuf">res/ods_32_8.png</property>
</object>
- <object class="GtkImage" id="database_image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">res/odb_32_8.png</property>
- </object>
<object class="GtkImage" id="database_all_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">res/odb_32_8.png</property>
</object>
- <object class="GtkImage" id="draw_image">
+ <object class="GtkImage" id="database_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="pixbuf">res/odg_32_8.png</property>
+ <property name="pixbuf">res/odb_32_8.png</property>
</object>
<object class="GtkImage" id="draw_all_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">res/odg_32_8.png</property>
</object>
- <object class="GtkImage" id="extension_image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixbuf">framework/res/extension.png</property>
- </object>
- <object class="GtkImage" id="impress_all_image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">New Presentation</property>
- <property name="pixbuf">res/odp_32_8.png</property>
- </object>
- <object class="GtkImage" id="info_image">
+ <object class="GtkImage" id="draw_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="pixbuf">framework/res/info_26.png</property>
+ <property name="pixbuf">res/odg_32_8.png</property>
</object>
<object class="GtkBox" id="StartCenter">
<property name="can_focus">False</property>
@@ -218,6 +202,7 @@
<object class="GtkGrid" id="grid5">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkButton" id="writer">
<property name="label" translatable="yes">New Document</property>
@@ -234,21 +219,8 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="show_writer_template">
- <property name="label" translatable="yes">Show Templates</property>
+ <object class="GtkButton" id="show_writer_recent">
+ <property name="label" translatable="yes">Show Recent</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -261,14 +233,14 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="show_writer_recent">
- <property name="label" translatable="yes">Show Recent</property>
+ <object class="GtkButton" id="show_writer_template">
+ <property name="label" translatable="yes">Show Templates</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
- <property name="left_attach">3</property>
+ <property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
@@ -351,6 +323,7 @@
<object class="GtkGrid" id="grid7">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkButton" id="calc">
<property name="label" translatable="yes">New Spreadsheet</property>
@@ -367,19 +340,6 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GtkButton" id="show_calc_template">
<property name="label" translatable="yes">Show Templates</property>
<property name="visible">True</property>
@@ -387,7 +347,7 @@
<property name="receives_default">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
+ <property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
@@ -401,7 +361,7 @@
<property name="receives_default">True</property>
</object>
<packing>
- <property name="left_attach">3</property>
+ <property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
@@ -484,6 +444,7 @@
<object class="GtkGrid" id="grid9">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkButton" id="impress">
<property name="label" translatable="yes">New Presentation</property>
@@ -500,19 +461,6 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GtkButton" id="show_impress_template">
<property name="label" translatable="yes">Show Templates</property>
<property name="visible">True</property>
@@ -520,7 +468,7 @@
<property name="receives_default">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
+ <property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
@@ -534,7 +482,7 @@
<property name="receives_default">True</property>
</object>
<packing>
- <property name="left_attach">3</property>
+ <property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
@@ -617,6 +565,7 @@
<object class="GtkGrid" id="grid11">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkButton" id="draw">
<property name="label" translatable="yes">New Drawing</property>
@@ -633,19 +582,6 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GtkButton" id="show_draw_template">
<property name="label" translatable="yes">Show Templates</property>
<property name="visible">True</property>
@@ -653,7 +589,7 @@
<property name="receives_default">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
+ <property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
@@ -667,7 +603,7 @@
<property name="receives_default">True</property>
</object>
<packing>
- <property name="left_attach">3</property>
+ <property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
@@ -870,52 +806,6 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">12</property>
- <property name="column_homogeneous">True</property>
- <child>
- <object class="GtkButton" id="open">
- <property name="label" translatable="yes">Open</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">open_image</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="templates">
- <property name="label" translatable="yes">Templates</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">templates_image</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
@@ -929,74 +819,120 @@
<property name="row_spacing">12</property>
<property name="column_spacing">12</property>
<child>
- <object class="GtkButton" id="info">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Get more information about %PRODUCTNAME</property>
- <property name="image">info_image</property>
- <property name="relief">none</property>
- </object>
- <packing>
- <property name="left_attach">4</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="extension">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Add new features to %PRODUCTNAME</property>
- <property name="image">extension_image</property>
- <property name="relief">none</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="add_temp">
+ <object class="GtkLabel" id="label16">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Get more templates for %PRODUCTNAME</property>
- <property name="image">add_temp_image</property>
- <property name="relief">none</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
+ <property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label16">
+ <object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
+ <property name="pixbuf">sfx2/res/startcenter-logo.png</property>
</object>
<packing>
- <property name="left_attach">1</property>
+ <property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkImage" id="image1">
+ <object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="pixbuf">sfx2/res/startcenter-logo.png</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkButton" id="open">
+ <property name="label" translatable="yes">Open</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">open_image</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="templates">
+ <property name="label" translatable="yes">Templates</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">templates_image</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="add_temp">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Get more templates for %PRODUCTNAME</property>
+ <property name="tooltip_text" translatable="yes">Get more templates for %PRODUCTNAME</property>
+ <property name="image">add_temp_image</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="extension">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Add new features to %PRODUCTNAME</property>
+ <property name="tooltip_text" translatable="yes">Add new features to %PRODUCTNAME</property>
+ <property name="image">extension_image</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="info">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Get more information about %PRODUCTNAME</property>
+ <property name="tooltip_text" translatable="yes">Get more information about %PRODUCTNAME</property>
+ <property name="image">info_image</property>
+ </object>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
+ <property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
@@ -1018,11 +954,27 @@
</packing>
</child>
</object>
+ <object class="GtkImage" id="extension_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">framework/res/extension.png</property>
+ </object>
+ <object class="GtkImage" id="impress_all_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">New Presentation</property>
+ <property name="pixbuf">res/odp_32_8.png</property>
+ </object>
<object class="GtkImage" id="impress_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">res/odp_32_8.png</property>
</object>
+ <object class="GtkImage" id="info_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">framework/res/info_26.png</property>
+ </object>
<object class="GtkImage" id="math_all_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -1043,12 +995,12 @@
<property name="can_focus">False</property>
<property name="pixbuf">framework/res/templates_32.png</property>
</object>
- <object class="GtkImage" id="writer_image">
+ <object class="GtkImage" id="writer_all_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">res/odt_32_8.png</property>
</object>
- <object class="GtkImage" id="writer_all_image">
+ <object class="GtkImage" id="writer_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">res/odt_32_8.png</property>