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:29 +0100
commit322d5b231c35fed64ea597deccf716ef1917cd26 (patch)
tree09355f30ceab0c8c8047d01dc1978711ae725f4a /cui
parentbe8fc29b4130e2bb3b8f1cdb50a5a6462d79723a (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/65059 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);