diff options
-rw-r--r-- | cui/source/inc/border.hxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/border.cxx | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index 2a3d14ed5062..433ab7425e5c 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -129,6 +129,7 @@ private: std::unique_ptr<SvtLineListBox> m_xLbLineStyle; std::unique_ptr<ColorListBox> m_xLbLineColor; + std::unique_ptr<weld::Widget> m_xLineWidthGroup; std::unique_ptr<weld::ComboBox> m_xLineWidthLB; std::unique_ptr<weld::MetricSpinButton> m_xLineWidthMF; diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 70ec64c1a3bc..59ecc1cfd2ee 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -294,6 +294,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle , m_xLbLineStyle(new SvtLineListBox(m_xBuilder->weld_menu_button("linestylelb"))) , m_xLbLineColor(new ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"), [this]{ return GetDialogController()->getDialog(); })) + , m_xLineWidthGroup(m_xBuilder->weld_widget("gridlinewidth")) , m_xLineWidthLB(m_xBuilder->weld_combo_box("linewidthlb")) , m_xLineWidthMF(m_xBuilder->weld_metric_spin_button("linewidthmf", FieldUnit::POINT)) , m_xSpacingFrame(m_xBuilder->weld_container("spacing")) @@ -524,6 +525,12 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle m_xWndPresets->SetSelectHdl( LINK( this, SvxBorderTabPage, SelPreHdl_Impl ) ); m_xWndShadows->SetSelectHdl( LINK( this, SvxBorderTabPage, SelSdwHdl_Impl ) ); + // lock the group to its original width where both widgets are shown so the + // notebook page contents don't jump around when the spinbox is + // hidden/shown + Size aOrigGroupSize(m_xLineWidthGroup->get_preferred_size()); + m_xLineWidthGroup->set_size_request(aOrigGroupSize.Width(), -1); + FillValueSets(); FillLineListBox_Impl(); |