diff options
-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 | ||||
-rw-r--r-- | include/sfx2/dialoghelper.hxx | 4 | ||||
-rw-r--r-- | include/svx/dlgctrl.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/dialog/dialoghelper.cxx | 10 | ||||
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 4 |
8 files changed, 37 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%"/> diff --git a/include/sfx2/dialoghelper.hxx b/include/sfx2/dialoghelper.hxx index 37cd6bbc98a7..d31a09492ecc 100644 --- a/include/sfx2/dialoghelper.hxx +++ b/include/sfx2/dialoghelper.hxx @@ -30,6 +30,10 @@ void SFX2_DLLPUBLIC setPreviewsToSamePlace(Window *pParent, VclBuilderContainer Size SFX2_DLLPUBLIC getParagraphPreviewOptimalSize(const Window *pReference); +Size SFX2_DLLPUBLIC getDrawPreviewOptimalSize(const Window *pReference); + +Size SFX2_DLLPUBLIC getDrawListBoxOptimalSize(const Window *pReference); + OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper); OUString SFX2_DLLPUBLIC formatTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper); diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index 76f9d2c697c5..210a0e4d0fd5 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -110,6 +110,7 @@ public: virtual void StateChanged( StateChangedType nStateChange ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); virtual void Resize(); + virtual Size GetOptimalSize() const; void Reset(); RECT_POINT GetActualRP() const; diff --git a/sfx2/source/dialog/dialoghelper.cxx b/sfx2/source/dialog/dialoghelper.cxx index e0ac93107780..c3440e6bf5be 100644 --- a/sfx2/source/dialog/dialoghelper.cxx +++ b/sfx2/source/dialog/dialoghelper.cxx @@ -57,6 +57,16 @@ Size getParagraphPreviewOptimalSize(const Window *pReference) return pReference->LogicToPixel(Size(68 , 112), MAP_APPFONT); } +Size getDrawPreviewOptimalSize(const Window *pReference) +{ + return pReference->LogicToPixel(Size(88, 42), MAP_APPFONT); +} + +Size getDrawListBoxOptimalSize(const Window *pReference) +{ + return pReference->LogicToPixel(Size(88, 110), MAP_APPFONT); +} + OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper) { Date aDate(22, 12, 2000); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index cc88c154356f..00c0b5081778 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -96,6 +96,10 @@ SvxRectCtl::SvxRectCtl(Window* pParent, RECT_POINT eRpt, Resize_Impl(); } +Size SvxRectCtl::GetOptimalSize() const +{ + return LogicToPixel(Size(39, 39), MAP_APPFONT); +} extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxRectCtl(Window *pParent, VclBuilder::stringmap &) { |