diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2016-06-29 19:10:25 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-06-30 13:38:45 +0000 |
commit | 5ee7caad68fecfb2124dd90e077597e92b6400c9 (patch) | |
tree | ca0e986bacd8f46775414496dc31c7ef69a5c7f5 | |
parent | 675c8faefd8756f7c43312f23eb341797bcbca4d (diff) |
GSoC added button with small padding
+ vcl builder setups action for custom buttons
+ new control: vcllo-SmallButton with WB_SMALLSTYLE property
Change-Id: I54891969f26d237eac8e45532906d76040264272
Reviewed-on: https://gerrit.libreoffice.org/26781
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r-- | extras/source/glade/libreoffice-catalog.xml.in | 3 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/notebookbar.ui | 88 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/notebookbar.ui | 96 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/notebookbar.ui | 106 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 4 |
6 files changed, 112 insertions, 192 deletions
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index 30dcecc94470..8744ebfb6bde 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -821,5 +821,8 @@ <glade-widget-class title="Slide Transition Pane" name="sdlo-SlideTransitionBox" generic-name="ShowText" parent="GtkToolButton" icon-name="widget-gtk-toolbutton"/> + <glade-widget-class title="Button with small padding" name="vcllo-SmallButton" + generic-name="SmallButton" parent="GtkButton" + icon-name="widget-gtk-button"/> </glade-widget-classes> </glade-catalog> diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui b/sc/uiconfig/scalc/ui/notebookbar.ui index cf72d70311dc..3c1752ce3149 100644 --- a/sc/uiconfig/scalc/ui/notebookbar.ui +++ b/sc/uiconfig/scalc/ui/notebookbar.ui @@ -237,8 +237,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="Paste"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="Paste"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -296,8 +295,7 @@ </packing> </child> <child> - <object class="GtkButton" id="FormatPaintbrush"> - <property name="width_request">130</property> + <object class="vcllo-SmallButton" id="FormatPaintbrush"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1379,8 +1377,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="DataDataPilotRun"> - <property name="width_request">130</property> + <object class="vcllo-SmallButton" id="DataDataPilotRun"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1418,8 +1415,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="InsertGraphic"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="InsertGraphic"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1435,8 +1431,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertAVMedia"> - <property name="width_request">110</property> + <object class="vcllo-SmallButton" id="InsertAVMedia"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1452,8 +1447,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertObjectChart"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="InsertObjectChart"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1503,8 +1497,7 @@ </packing> </child> <child> - <object class="GtkButton" id="EditHeaderAndFooter"> - <property name="width_request">150</property> + <object class="vcllo-SmallButton" id="EditHeaderAndFooter"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1520,8 +1513,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertAnnotation"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="InsertAnnotation"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1537,8 +1529,7 @@ </packing> </child> <child> - <object class="GtkButton" id="HyperlinkDialog"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="HyperlinkDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1566,8 +1557,7 @@ </packing> </child> <child> - <object class="GtkButton" id="DrawText"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="DrawText"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1599,8 +1589,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="InsertSymbol"> - <property name="width_request">130</property> + <object class="vcllo-SmallButton" id="InsertSymbol"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1616,8 +1605,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertObjectStarMath"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="InsertObjectStarMath"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1665,8 +1653,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="PageFormatDialog"> - <property name="width_request">100</property> + <object class="vcllo-SmallButton" id="PageFormatDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1682,8 +1669,7 @@ </packing> </child> <child> - <object class="GtkButton" id="EditPrintArea"> - <property name="width_request">120</property> + <object class="vcllo-SmallButton" id="EditPrintArea"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1764,8 +1750,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="BringToFront"> - <property name="width_request">100</property> + <object class="vcllo-SmallButton" id="BringToFront"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1781,8 +1766,7 @@ </packing> </child> <child> - <object class="GtkButton" id="SendToBack"> - <property name="width_request">100</property> + <object class="vcllo-SmallButton" id="SendToBack"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1798,8 +1782,7 @@ </packing> </child> <child> - <object class="GtkButton" id="FormatGroup"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="FormatGroup"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1815,8 +1798,7 @@ </packing> </child> <child> - <object class="GtkButton" id="FormatUngroup"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="FormatUngroup"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1986,8 +1968,7 @@ </packing> </child> <child> - <object class="GtkButton" id="DataSort1"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="DataSort1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2003,8 +1984,7 @@ </packing> </child> <child> - <object class="GtkButton" id="DataFilterAutoFilter"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="DataFilterAutoFilter"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2249,8 +2229,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="SpellDialog"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="SpellDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2266,8 +2245,7 @@ </packing> </child> <child> - <object class="GtkButton" id="SpellOnline"> - <property name="width_request">180</property> + <object class="vcllo-SmallButton" id="SpellOnline"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2283,8 +2261,7 @@ </packing> </child> <child> - <object class="GtkButton" id="ThesaurusDialog"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="ThesaurusDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2323,8 +2300,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="InsertAnnotation1"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="InsertAnnotation1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2447,8 +2423,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="Protect"> - <property name="width_request">105</property> + <object class="vcllo-SmallButton" id="Protect"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2464,8 +2439,7 @@ </packing> </child> <child> - <object class="GtkButton" id="ToolProtectionDocument"> - <property name="width_request">145</property> + <object class="vcllo-SmallButton" id="ToolProtectionDocument"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2597,7 +2571,6 @@ </child> <child> <object class="GtkButton" id="ToggleSheetGrid2"> - <property name="width_request">250</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2651,8 +2624,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="Zoom"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="Zoom"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2733,8 +2705,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="SplitWindow"> - <property name="width_request">100</property> + <object class="vcllo-SmallButton" id="SplitWindow"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2750,8 +2721,7 @@ </packing> </child> <child> - <object class="GtkButton" id="FreezePanes"> - <property name="width_request">200</property> + <object class="vcllo-SmallButton" id="FreezePanes"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> diff --git a/sd/uiconfig/simpress/ui/notebookbar.ui b/sd/uiconfig/simpress/ui/notebookbar.ui index 35474c9972f9..7ef837ece2e1 100644 --- a/sd/uiconfig/simpress/ui/notebookbar.ui +++ b/sd/uiconfig/simpress/ui/notebookbar.ui @@ -227,8 +227,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="Paste"> - <property name="width_request">70</property> + <object class="sdlo-SmallButton" id="Paste"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -286,8 +285,7 @@ </packing> </child> <child> - <object class="GtkButton" id="FormatPaintbrush"> - <property name="width_request">130</property> + <object class="vcllo-SmallButton" id="FormatPaintbrush"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -326,8 +324,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="InsertSlide"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="InsertSlide"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1261,8 +1258,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="BringToFront"> - <property name="width_request">100</property> + <object class="vcllo-SmallButton" id="BringToFront"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1320,8 +1316,7 @@ </packing> </child> <child> - <object class="GtkButton" id="SendToBack"> - <property name="width_request">100</property> + <object class="vcllo-SmallButton" id="SendToBack"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1373,8 +1368,7 @@ <property name="can_focus">False</property> <property name="spacing">6</property> <child> - <object class="GtkButton" id="InsertSlide1"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="InsertSlide1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1402,8 +1396,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertTable"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="InsertTable"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1435,8 +1428,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="InsertGraphic"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="InsertGraphic"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1494,8 +1486,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertObjectChart"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="InsertObjectChart"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1686,8 +1677,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="HyperlinkDialog"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="HyperlinkDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1703,8 +1693,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertAnnotation"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="InsertAnnotation"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1720,8 +1709,7 @@ </packing> </child> <child> - <object class="GtkButton" id="Text2"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="Text2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1737,8 +1725,7 @@ </packing> </child> <child> - <object class="GtkButton" id="HeaderAndFooter"> - <property name="width_request">140</property> + <object class="vcllo-SmallButton" id="HeaderAndFooter"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1754,8 +1741,7 @@ </packing> </child> <child> - <object class="GtkButton" id="FontworkGalleryFloater"> - <property name="width_request">120</property> + <object class="vcllo-SmallButton" id="FontworkGalleryFloater"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1794,8 +1780,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="InsertSymbol"> - <property name="width_request">130</property> + <object class="vcllo-SmallButton" id="InsertSymbol"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1811,8 +1796,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertMath"> - <property name="width_request">75</property> + <object class="vcllo-SmallButton" id="InsertMath"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1847,8 +1831,7 @@ </packing> </child> <child> - <object class="GtkButton" id="ImportFromFile"> - <property name="width_request">50</property> + <object class="vcllo-SmallButton" id="ImportFromFile"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1933,8 +1916,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="Presentation"> - <property name="width_request">150</property> + <object class="vcllo-SmallButton" id="Presentation"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1950,8 +1932,7 @@ </packing> </child> <child> - <object class="GtkButton" id="PresentationCurrentSlide"> - <property name="width_request">170</property> + <object class="vcllo-SmallButton" id="PresentationCurrentSlide"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1990,8 +1971,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="RehearseTimings"> - <property name="width_request">140</property> + <object class="vcllo-SmallButton" id="RehearseTimings"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2097,8 +2077,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="SpellDialog"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="SpellDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2114,8 +2093,7 @@ </packing> </child> <child> - <object class="GtkButton" id="SpellOnline"> - <property name="width_request">180</property> + <object class="vcllo-SmallButton" id="SpellOnline"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2131,8 +2109,7 @@ </packing> </child> <child> - <object class="GtkButton" id="ThesaurusDialog"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="ThesaurusDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2171,8 +2148,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="InsertAnnotation1"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="InsertAnnotation1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2235,7 +2211,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="NormalMultiPaneGUI"> + <object class="vcllo-SmallButton" id="NormalMultiPaneGUI"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2250,7 +2226,7 @@ </packing> </child> <child> - <object class="GtkButton" id="OutlineMode"> + <object class="vcllo-SmallButton" id="OutlineMode"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2349,7 +2325,7 @@ </packing> </child> <child> - <object class="GtkButton" id="HandoutMode"> + <object class="vcllo-SmallButton" id="HandoutMode"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2425,8 +2401,7 @@ </packing> </child> <child> - <object class="GtkButton" id="ShowAnnotations"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="ShowAnnotations"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2458,8 +2433,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="Zoom"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="Zoom"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2475,8 +2449,7 @@ </packing> </child> <child> - <object class="GtkButton" id="ZoomOptimal"> - <property name="width_request">100</property> + <object class="vcllo-SmallButton" id="ZoomOptimal"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2492,8 +2465,7 @@ </packing> </child> <child> - <object class="GtkButton" id="ZoomPage"> - <property name="width_request">90</property> + <object class="vcllo-SmallButton" id="ZoomPage"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2532,7 +2504,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="OutputQualityColor"> + <object class="vcllo-SmallButton" id="OutputQualityColor"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2547,7 +2519,7 @@ </packing> </child> <child> - <object class="GtkButton" id="OutputQualityGrayscale"> + <object class="vcllo-SmallButton" id="OutputQualityGrayscale"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2562,7 +2534,7 @@ </packing> </child> <child> - <object class="GtkButton" id="OutputQualityBlackWhite"> + <object class="vcllo-SmallButton" id="OutputQualityBlackWhite"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> diff --git a/sw/uiconfig/swriter/ui/notebookbar.ui b/sw/uiconfig/swriter/ui/notebookbar.ui index 2c9cbdd9d174..8df7c6426143 100644 --- a/sw/uiconfig/swriter/ui/notebookbar.ui +++ b/sw/uiconfig/swriter/ui/notebookbar.ui @@ -263,8 +263,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="button5"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="button5"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -325,8 +324,7 @@ </packing> </child> <child> - <object class="GtkButton" id="FormatPaintbrush"> - <property name="width_request">130</property> + <object class="vcllo-SmallButton" id="FormatPaintbrush"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1164,8 +1162,7 @@ </packing> </child> <child> - <object class="GtkButton" id="SearchDialog"> - <property name="width_request">120</property> + <object class="vcllo-SmallButton" id="SearchDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1261,8 +1258,7 @@ </packing> </child> <child> - <object class="GtkButton" id="inserttable"> - <property name="width_request">110</property> + <object class="vcllo-SmallButton" id="inserttable"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1295,8 +1291,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="InsertGraphic"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="InsertGraphic"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1313,8 +1308,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertAVMedia"> - <property name="width_request">110</property> + <object class="vcllo-SmallButton" id="InsertAVMedia"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1331,8 +1325,7 @@ </packing> </child> <child> - <object class="GtkButton" id="Gallery"> - <property name="width_request">105</property> + <object class="vcllo-SmallButton" id="Gallery"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1349,8 +1342,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertObjectChart"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="InsertObjectChart"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1432,8 +1424,7 @@ </packing> </child> <child> - <object class="GtkButton" id="insertreferencefield"> - <property name="width_request">125</property> + <object class="vcllo-SmallButton" id="insertreferencefield"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1468,8 +1459,7 @@ </packing> </child> <child> - <object class="GtkButton" id="Insertnnotation"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="Insertnnotation"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1502,8 +1492,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="InsertPageHeader"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="InsertPageHeader"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1520,8 +1509,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertPageFooter"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="InsertPageFooter"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1561,8 +1549,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="DrawText"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="DrawText"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1743,8 +1730,7 @@ </packing> </child> <child> - <object class="GtkButton" id="EditGlossary"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="EditGlossary"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1787,8 +1773,7 @@ <property name="can_focus">False</property> <property name="spacing">6</property> <child> - <object class="GtkButton" id="PageDialog"> - <property name="width_request">110</property> + <object class="vcllo-SmallButton" id="PageDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1805,8 +1790,7 @@ </packing> </child> <child> - <object class="GtkButton" id="FormatColumns"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="FormatColumns"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1855,8 +1839,7 @@ </packing> </child> <child> - <object class="GtkButton" id="Hyphenate"> - <property name="width_request">100</property> + <object class="vcllo-SmallButton" id="Hyphenate"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -1981,9 +1964,8 @@ <property name="can_focus">False</property> <property name="spacing">6</property> <child> - <object class="GtkButton" id="InsertMultiIndex"> + <object class="vcllo-SmallButton" id="InsertMultiIndex"> <property name="label" translatable="yes">Table of Contents</property> - <property name="width_request">130</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2000,8 +1982,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertIndexesEntry"> - <property name="width_request">90</property> + <object class="vcllo-SmallButton" id="InsertIndexesEntry"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2088,8 +2069,7 @@ <property name="can_focus">False</property> <property name="spacing">6</property> <child> - <object class="GtkButton" id="InsertFootnote"> - <property name="width_request">110</property> + <object class="vcllo-SmallButton" id="InsertFootnote"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2214,8 +2194,7 @@ <property name="can_focus">False</property> <property name="spacing">6</property> <child> - <object class="GtkButton" id="InsertCaptionDialog1"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="InsertCaptionDialog1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2307,8 +2286,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="SpellingAndGrammarDialog"> - <property name="width_request">160</property> + <object class="vcllo-SmallButton" id="SpellingAndGrammarDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2325,8 +2303,7 @@ </packing> </child> <child> - <object class="GtkButton" id="SpellOnline"> - <property name="width_request">180</property> + <object class="vcllo-SmallButton" id="SpellOnline"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2343,8 +2320,7 @@ </packing> </child> <child> - <object class="GtkButton" id="ThesaurusDialog"> - <property name="width_request">90</property> + <object class="vcllo-SmallButton" id="ThesaurusDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2400,8 +2376,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="InsertAnnotation"> - <property name="width_request">80</property> + <object class="vcllo-SmallButton" id="InsertAnnotation"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2456,8 +2431,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="TrackChanges"> - <property name="width_request">120</property> + <object class="vcllo-SmallButton" id="TrackChanges"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2474,8 +2448,7 @@ </packing> </child> <child> - <object class="GtkButton" id="AcceptTrackedChanges"> - <property name="width_request">125</property> + <object class="vcllo-SmallButton" id="AcceptTrackedChanges"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2649,8 +2622,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <child> - <object class="GtkButton" id="CompareDocuments"> - <property name="width_request">140</property> + <object class="vcllo-SmallButton" id="CompareDocuments"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2668,7 +2640,6 @@ </child> <child> <object class="GtkButton" id="MergeDocuments"> - <property name="width_request">140</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2718,8 +2689,7 @@ <property name="can_focus">False</property> <property name="spacing">6</property> <child> - <object class="GtkButton" id="PrintPreview"> - <property name="width_request">110</property> + <object class="vcllo-SmallButton" id="PrintPreview"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2835,8 +2805,7 @@ </packing> </child> <child> - <object class="GtkButton" id="GridVisible"> - <property name="width_request">100</property> + <object class="vcllo-SmallButton" id="GridVisible"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2877,8 +2846,7 @@ <property name="can_focus">False</property> <property name="spacing">6</property> <child> - <object class="GtkButton" id="Zoom"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="Zoom"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2895,8 +2863,7 @@ </packing> </child> <child> - <object class="GtkButton" id="Zoom100Percent"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="Zoom100Percent"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -2913,8 +2880,7 @@ </packing> </child> <child> - <object class="GtkButton" id="ZoomOptimal"> - <property name="width_request">100</property> + <object class="vcllo-SmallButton" id="ZoomOptimal"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -3074,8 +3040,7 @@ </packing> </child> <child> - <object class="GtkButton" id="InsertCaptionDialog"> - <property name="width_request">70</property> + <object class="vcllo-SmallButton" id="InsertCaptionDialog"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -3380,8 +3345,7 @@ </packing> </child> <child> - <object class="GtkButton" id="TableSort"> - <property name="width_request">60</property> + <object class="vcllo-SmallButton" id="TableSort"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index b9d2432579ba..9c7c2aad2687 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -25,6 +25,7 @@ #include <vcl/image.hxx> #include <vcl/bitmap.hxx> #include <vcl/bitmapex.hxx> +#include <vcl/builderfactory.hxx> #include <vcl/decoview.hxx> #include <vcl/event.hxx> #include <vcl/svapp.hxx> @@ -3942,4 +3943,10 @@ void DisclosureButton::KeyInput( const KeyEvent& rKEvt ) CheckBox::KeyInput( rKEvt ); } +VCL_BUILDER_DECL_FACTORY(SmallButton) +{ + (void)rMap; + rRet = VclPtr<PushButton>::Create(pParent, WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER|WB_FLATBUTTON|WB_SMALLSTYLE); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 9797956cfd50..7e449982c5d4 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -89,6 +89,8 @@ namespace eRet = SymbolType::IMAGE; return eRet; } + + void setupFromActionName(Button *pButton, VclBuilder::stringmap &rMap, const css::uno::Reference<css::frame::XFrame>& rFrame); } void VclBuilder::loadTranslations(const LanguageTag &rLanguageTag, const OUString& rUri) @@ -1782,6 +1784,8 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & { VclPtr<vcl::Window> xParent(pParent); pFunction(xWindow, xParent, rMap); + if (xWindow->GetType() == WINDOW_PUSHBUTTON) + setupFromActionName(static_cast<Button*>(xWindow.get()), rMap, m_xFrame); } } } |