diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-26 17:09:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-26 17:11:56 +0100 |
commit | 902276557566bbcbcef7e8de4d119196fdcfa345 (patch) | |
tree | 845f8be0300bada6b6e3515326d853648da3939e /cui | |
parent | Convert shadow tab page to widget UI (diff) | |
download | core-902276557566bbcbcef7e8de4d119196fdcfa345.tar.gz core-902276557566bbcbcef7e8de4d119196fdcfa345.zip |
stash rather arbitrary widget sizes in one place
Change-Id: I26cc3185d6abbce516f7c7d9243962b873587859
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 5 | ||||
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tphatch.cxx | 8 | ||||
-rw-r--r-- | cui/uiconfig/ui/shadowtabpage.ui | 24 |
4 files changed, 18 insertions, 23 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index ea37ea54c4eb..2b80d1031da4 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -21,6 +21,7 @@ #include <vcl/builder.hxx> #include <vcl/msgbox.hxx> #include <tools/urlobj.hxx> +#include <sfx2/dialoghelper.hxx> #include <sfx2/objsh.hxx> #include <sfx2/docfile.hxx> #include <svl/cntwall.hxx> @@ -370,11 +371,11 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(Window* pParent, const SfxItemSet& rC // Initialize gradient controls get(m_pBackGroundGradientFrame, "backgroundgradientframe"); get(m_pLbGradients, "gradientslb"); - Size aSize = LogicToPixel(Size(88, 110), MAP_APPFONT); + Size aSize = getDrawListBoxOptimalSize(this); m_pLbGradients->set_width_request(aSize.Width()); m_pLbGradients->set_height_request(aSize.Height()); get(m_pCtlPreview, "previewctl"); - aSize = LogicToPixel(Size(88, 42), MAP_APPFONT); + aSize = getDrawPreviewOptimalSize(this); m_pCtlPreview->set_width_request(aSize.Width()); m_pCtlPreview->set_height_request(aSize.Height()); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index fc3e04be3fc5..31bb3456637a 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -78,11 +78,11 @@ SvxGradientTabPage::SvxGradientTabPage get(m_pLbColorTo, "colortolb"); get(m_pMtrColorTo, "colortomtr"); get(m_pLbGradients, "gradientslb"); - Size aSize = LogicToPixel(Size(88, 110), MAP_APPFONT); + Size aSize = getDrawListBoxOptimalSize(this); m_pLbGradients->set_width_request(aSize.Width()); m_pLbGradients->set_height_request(aSize.Height()); get(m_pCtlPreview, "previewctl"); - aSize = LogicToPixel(Size(88, 42), MAP_APPFONT); + aSize = getDrawPreviewOptimalSize(this); m_pCtlPreview->set_width_request(aSize.Width()); m_pCtlPreview->set_height_request(aSize.Height()); get(m_pBtnAdd, "add"); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 2305c65fead0..b429820ff931 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -72,16 +72,16 @@ SvxHatchTabPage::SvxHatchTabPage get(m_pMtrAngle, "anglemtr"); get(m_pCtlAngle, "anglectl"); m_pCtlAngle->SetCS(CS_ANGLE); - Size aSize = LogicToPixel(Size(39, 39), MAP_APPFONT); - m_pCtlAngle->set_width_request(aSize.Width()); - m_pCtlAngle->set_height_request(aSize.Height()); get(m_pLbLineType, "linetypelb"); get(m_pLbLineColor, "linecolorlb"); get(m_pLbHatchings, "hatchingslb"); - aSize = LogicToPixel(Size(88, 110), MAP_APPFONT); + Size aSize = getDrawListBoxOptimalSize(this); m_pLbHatchings->set_width_request(aSize.Width()); m_pLbHatchings->set_height_request(aSize.Height()); get(m_pCtlPreview, "previewctl"); + aSize = getDrawPreviewOptimalSize(this); + m_pCtlPreview->set_width_request(aSize.Width()); + m_pCtlPreview->set_height_request(aSize.Height()); get(m_pBtnAdd, "add"); get(m_pBtnModify, "modify"); get(m_pBtnDelete, "delete"); diff --git a/cui/uiconfig/ui/shadowtabpage.ui b/cui/uiconfig/ui/shadowtabpage.ui index 421e4fb6cb5e..4110a8cf5a6f 100644 --- a/cui/uiconfig/ui/shadowtabpage.ui +++ b/cui/uiconfig/ui/shadowtabpage.ui @@ -2,11 +2,6 @@ <interface> <!-- interface-requires gtk+ 3.0 --> <!-- interface-requires LibreOffice 1.0 --> - <object class="GtkAdjustment" id="adjustmentDistance"> - <property name="upper">999</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - </object> <object class="GtkAdjustment" id="adjustmentPercent"> <property name="upper">100</property> <property name="step_increment">5</property> @@ -33,9 +28,10 @@ <property name="spacing">12</property> <property name="homogeneous">True</property> <child> - <object class="GtkBox" id="box2"> + <object class="GtkBox" id="maingrid"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="vexpand">True</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> @@ -59,6 +55,7 @@ <object class="GtkGrid" id="gridSHADOW"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="vexpand">True</property> <property name="row_spacing">6</property> <property name="column_spacing">12</property> <child> @@ -93,8 +90,6 @@ <object class="svxlo-SvxRectCtl" id="CTL_POSITION"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> </object> <packing> <property name="left_attach">1</property> @@ -146,13 +141,7 @@ <property name="halign">start</property> <property name="left_padding">12</property> <child> - <object class="GtkLabel" id="FT_POSITION"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">_Position</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">CTL_POSITION</property> - </object> + <placeholder/> </child> </object> <packing> @@ -271,6 +260,11 @@ </object> </child> </object> + <object class="GtkAdjustment" id="adjustmentDistance"> + <property name="upper">999</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> <object class="GtkSizeGroup" id="sizegroup1"> <widgets> <widget name="MTR_SHADOW_TRANSPARENT:0%"/> |