diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/layout.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index ffce00dc2004..88823f17db6a 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1706,8 +1706,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()); |