summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-19 17:20:00 +0100
committerAndras Timar <andras.timar@collabora.com>2014-08-21 21:24:49 +0200
commit62123ec2c4a256a015a6059c6a7bc106ba3c96c9 (patch)
tree7fc263ffeb2698a69a7db7b623e3e1a1ac9784eb /vcl
parent4f9c43d5cbff18e84b0726a37779e5f5af64c589 (diff)
only subtract height of hscroll if visible
otherwise infinite loop in extensions update check Change-Id: I0dbf4f34208f1bf0854e365006a79470b26571f3 (cherry picked from commit 749f7548b4ee746d69c20a828ea6d3b853eba8d3) Reviewed-on: https://gerrit.libreoffice.org/11034 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/layout.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 517fa3317fea..06f387b2520f 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1704,8 +1704,11 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation)
// horz. ScrollBar
if (GetStyle() & WB_AUTOHSCROLL)
{
- m_aHScroll.Show(nAvailWidth < aChildReq.Width());
- nAvailHeight -= getLayoutRequisition(m_aHScroll).Height();
+ bool bShowHScroll = nAvailWidth < aChildReq.Width();
+ m_aHScroll.Show(bShowHScroll);
+
+ if (bShowHScroll)
+ nAvailHeight -= getLayoutRequisition(m_aHScroll).Height();
if (GetStyle() & WB_AUTOVSCROLL)
m_aVScroll.Show(nAvailHeight < aChildReq.Height());