diff options
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 3 | ||||
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 5 |
3 files changed, 4 insertions, 6 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 3d69c9c717ae..d23a5209a78a 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -242,8 +242,6 @@ private: SfxItemSet& m_rXFSet; protected: - Size m_aColorSize; - std::unique_ptr<weld::Container> m_xFillTab; std::unique_ptr<weld::ToggleButton> m_xBtnNone; std::unique_ptr<weld::ToggleButton> m_xBtnColor; diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index e7926e552be3..efcc9d270be9 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1376,8 +1376,6 @@ SvxBkgTabPage::SvxBkgTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs) SetColorList(pColorTable); SetBitmapList(pBitmapList); - - m_xFillTab->set_size_request(m_aColorSize.Width(), m_aColorSize.Height()); } SvxBkgTabPage::~SvxBkgTabPage() @@ -1506,6 +1504,7 @@ void SvxBkgTabPage::PageCreated(const SfxAllItemSet& aSet) } if (nFlags & SvxBackgroundTabFlags::SHOW_SELECTOR) m_xBtnBitmap->show(); + SetOptimalSize(GetDialogController()); } if ( bCharBackColor ) diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index a311becb2fe1..b29d8147889a 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -121,6 +121,8 @@ SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs void SvxAreaTabPage::SetOptimalSize(weld::DialogController* pController) { + m_xFillTab->set_size_request(-1, -1); + TabPageParent aFillTab(m_xFillTab.get(), pController); // TEMP if (!aFillTab.pController) @@ -128,8 +130,7 @@ void SvxAreaTabPage::SetOptimalSize(weld::DialogController* pController) // Calculate optimal size of all pages.. m_pFillTabPage.disposeAndReset(SvxColorTabPage::Create(aFillTab, &m_rXFSet)); - m_aColorSize = m_xFillTab->get_preferred_size(); - Size aSize(m_aColorSize); + Size aSize(m_xFillTab->get_preferred_size()); if (m_xBtnGradient->get_visible()) { |