[Libreoffice-commits] core.git: svtools/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 27 18:12:16 UTC 2020


 svtools/source/brwbox/brwbox1.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 7fd9bd4cdf4ffc03b2280964ef3f7e5917769bbd
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jul 27 11:43:12 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jul 27 20:11:33 2020 +0200

    we want the position of the start of the scrollbar
    
    not its width, but its width and the the width of the corner square
    or just take its position if visible
    
    Change-Id: Ideaea789046fb03067501798b5a541985ef75e0e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99485
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 5bac96fc1945..eb185380af8a 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -2072,10 +2072,11 @@ bool BrowseBox::ReserveControlArea(sal_uInt16 nWidth)
 tools::Rectangle BrowseBox::GetControlArea() const
 {
     auto nHeight = aHScroll->GetSizePixel().Height();
+    auto nEndRight = aHScroll->IsVisible() ? aHScroll->GetPosPixel().X() : GetOutputSizePixel().Width();
+
     return tools::Rectangle(
         Point( 0, GetOutputSizePixel().Height() - nHeight ),
-        Size( GetOutputSizePixel().Width() - aHScroll->GetSizePixel().Width(),
-             nHeight ) );
+        Size( nEndRight, nHeight ) );
 }
 
 void BrowseBox::SetMode( BrowserMode nMode )


More information about the Libreoffice-commits mailing list