cui/source/inc/cuitabarea.hxx | 6 ++++++ cui/source/tabpages/backgrnd.cxx | 2 ++ cui/source/tabpages/tparea.cxx | 15 ++++++++++----- 3 files changed, 18 insertions(+), 5 deletions(-)
New commits: commit 50202505b1087f29e7772436d0c52f5d8550ca29 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Sep 12 17:18:14 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Sep 13 09:55:38 2018 +0200 background tab reserves size for pages it never shows Change-Id: I47e4b9481139bf05c4454712fa2f3f2d7cfbe10c Reviewed-on: https://gerrit.libreoffice.org/60415 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 4681de332251..3bdfe064c70f 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -245,6 +245,12 @@ private: SfxItemSet& m_rXFSet; protected: + Size m_aColorSize; + Size m_aGradientSize; + Size m_aBitmapSize; + Size m_aHatchSize; + Size m_aPatternSize; + 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 5bf5038bb93c..28b67bd5bcfc 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1468,6 +1468,8 @@ SvxBkgTabPage::SvxBkgTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs) SetColorList(pColorTable); SetBitmapList(pBitmapList); + + m_xFillTab->set_size_request(m_aColorSize.Width(), m_aColorSize.Height()); } SvxBkgTabPage::~SvxBkgTabPage() diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 40b3e970f877..68d85d7f0ae1 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -125,17 +125,22 @@ SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs // Calculate optimal size of all pages.. m_pFillTabPage.disposeAndReset(SvxColorTabPage::Create(aFillTab, &m_rXFSet)); - Size aSize = m_pFillTabPage->get_container_size(); + m_aColorSize = m_pFillTabPage->get_container_size(); m_pFillTabPage.disposeAndReset(SvxGradientTabPage::Create(aFillTab, &m_rXFSet)); - lclExtendSize(aSize, m_pFillTabPage->get_container_size()); + m_aGradientSize = m_pFillTabPage->get_container_size(); m_pFillTabPage.disposeAndReset(SvxBitmapTabPage::Create(aFillTab, &m_rXFSet)); - lclExtendSize(aSize, m_pFillTabPage->get_container_size()); + m_aBitmapSize = m_pFillTabPage->get_container_size(); m_pFillTabPage.disposeAndReset(SvxHatchTabPage::Create(aFillTab, &m_rXFSet)); - lclExtendSize(aSize, m_pFillTabPage->get_container_size()); + m_aHatchSize = m_pFillTabPage->get_container_size(); m_pFillTabPage.disposeAndReset(SvxPatternTabPage::Create(aFillTab, &m_rXFSet)); - lclExtendSize(aSize, m_pFillTabPage->get_container_size()); + m_aPatternSize = m_pFillTabPage->get_container_size(); m_pFillTabPage.disposeAndClear(); + Size aSize(m_aColorSize); + lclExtendSize(aSize, m_aGradientSize); + lclExtendSize(aSize, m_aBitmapSize); + lclExtendSize(aSize, m_aHatchSize); + lclExtendSize(aSize, m_aPatternSize); m_xFillTab->set_size_request(aSize.Width(), aSize.Height()); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits