summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-12-12 21:28:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-12-13 09:52:15 +0100
commit115268087dea599d4248213b1085d07275c0a007 (patch)
treebee35359a87691ad3fff5bbadf18a8b0be18a873 /cui
parent1b843d6ea39e23f4a5e34438b283afc85afc0e9e (diff)
Resolves: tdf#120481 gradient subpage 12 pixels too short
because the max preferred-size of the subpages is taken and applied as the size-request of the container parent. But the container parent as a 6px border, so the subpages end up hosted in a parent which allocates them 12px less than they hoped for. As they are instantiated in the parent to measure them, measure their parent instead and that calculates in the parent's border to end up with what they wanted Change-Id: Ib270b90f9c2fed7f8bd042cc66d0d10ad3c6f183 Reviewed-on: https://gerrit.libreoffice.org/65058 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/tabpages/tparea.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 33e4137b470e..a6d1f429296e 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -125,15 +125,16 @@ SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs
// Calculate optimal size of all pages..
m_pFillTabPage.disposeAndReset(SvxColorTabPage::Create(aFillTab, &m_rXFSet));
- m_aColorSize = m_pFillTabPage->get_container_size();
+ m_aColorSize = m_xFillTab->get_preferred_size();
m_pFillTabPage.disposeAndReset(SvxGradientTabPage::Create(aFillTab, &m_rXFSet));
- Size aGradientSize = m_pFillTabPage->get_container_size();
+ Size aGradientSize = m_xFillTab->get_preferred_size();
+ fprintf(stderr, "aGradientSize %ld\n", aGradientSize.Height());
m_pFillTabPage.disposeAndReset(SvxBitmapTabPage::Create(aFillTab, &m_rXFSet));
- Size aBitmapSize = m_pFillTabPage->get_container_size();
+ Size aBitmapSize = m_xFillTab->get_preferred_size();
m_pFillTabPage.disposeAndReset(SvxHatchTabPage::Create(aFillTab, &m_rXFSet));
- Size aHatchSize = m_pFillTabPage->get_container_size();
+ Size aHatchSize = m_xFillTab->get_preferred_size();
m_pFillTabPage.disposeAndReset(SvxPatternTabPage::Create(aFillTab, &m_rXFSet));
- Size aPatternSize = m_pFillTabPage->get_container_size();
+ Size aPatternSize = m_xFillTab->get_preferred_size();
m_pFillTabPage.disposeAndClear();
Size aSize(m_aColorSize);