diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-12 17:18:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-13 09:55:38 +0200 |
commit | 50202505b1087f29e7772436d0c52f5d8550ca29 (patch) | |
tree | 0dac92c74b87110ebe762bb7322b3bf95b44301e /cui | |
parent | 9784934cb9054e7aa7b1574f926a555b107a31c8 (diff) |
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 <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 15 |
3 files changed, 18 insertions, 5 deletions
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()); } |