diff options
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/layout.cxx | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 680a650f34f2..d9f479ee39e6 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2100,27 +2100,15 @@ bool VclScrolledWindow::EventNotify(NotifyEvent& rNEvt) return bDone || VclBin::EventNotify( rNEvt ); } -void VclScrolledWindow::updateBorderWidth(tools::Long nBorderWidth) -{ - if (m_nBorderWidth == nBorderWidth || nBorderWidth < 1) - return; - - m_nBorderWidth = nBorderWidth; - // update scrollbars and child window - doSetAllocation(GetSizePixel(), false); -}; - void VclScrolledWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { + VclBin::Paint(rRenderContext, rRect); const tools::Rectangle aRect(tools::Rectangle(Point(0,0), GetSizePixel())); DecorationView aDecoView(&rRenderContext); const tools::Rectangle aContentRect = aDecoView.DrawFrame(aRect, m_eDrawFrameStyle, m_eDrawFrameFlags); - - // take potentially changed frame size into account before rendering content - const tools::Long nFrameWidth = (aRect.GetWidth() - aContentRect.GetWidth()) / 2; - updateBorderWidth(nFrameWidth); - - VclBin::Paint(rRenderContext, rRect); + const auto nBorderWidth = (aRect.GetWidth() - aContentRect.GetWidth()) / 2; + SAL_WARN_IF(nBorderWidth > m_nBorderWidth, "vcl.layout", "desired border at paint " << + nBorderWidth << " is larger than expected " << m_nBorderWidth); } void VclViewport::setAllocation(const Size &rAllocation) |