diff options
author | Jim Raykowski <raykowj@gmail.com> | 2019-01-20 00:50:15 -0900 |
---|---|---|
committer | Xisco FaulĂ <xiscofauli@libreoffice.org> | 2019-03-18 21:08:07 +0100 |
commit | 38792118d9e8bbbf1d1ee1f1874b32991fb1442b (patch) | |
tree | 1c438a9294f028961c53b983888935c5e9f86ead /cui | |
parent | 8e9041dfdab7f99f79fdc6d32d3e50e8b4114cdd (diff) |
Fix squeezed Bitmap fill style tab page layout in Background tab page
Just use the size set by the Area tab page class
Change-Id: Ie87b4e86a3c80e94f6d916dab217e52c82558074
Reviewed-on: https://gerrit.libreoffice.org/66650
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
(cherry picked from commit db4c828913cfc8c33b8cc87b576fddcc2e705176)
Resolves: tdf#124058 factor bitmap page into size req when its toggled on
post ctor time
Change-Id: I8257c8ffdfc4dab9893ab7d2d67e218dd3f8097c
don't need m_aColorSize
Change-Id: I27740ae0bff0d1676799ddfba76eab5e7a299f66
Reviewed-on: https://gerrit.libreoffice.org/69364
Tested-by: Jenkins
Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
Diffstat (limited to 'cui')
-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()) { |