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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 16 18:33:07 UTC 2020


 vcl/source/control/scrbar.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit c83cde1dd8f6c17b8cd17e0c6d7cef9be2598f43
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Apr 16 16:28:32 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 16 20:32:32 2020 +0200

    gen backend scrollbars are missing their contents
    
    since...
    
    commit 059f07f9f33460c809a93e0fda1165f5c6f6d805
    Date:   Wed Apr 15 18:34:58 2020 +0200
    
        fixes for code creating reversed Rectangles
    
        ie. where left > right or top > bottom
    
    revert that hunk and it works again but add a Justify
    call to normalize the rectangle
    
    Change-Id: I42b3f1867c6f9bae92e952b444c7946831a5d95c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92381
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Jenkins

diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 976a5b452c97..f70ad9ff4cd2 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -269,7 +269,10 @@ void ScrollBar::ImplCalc( bool bUpdate )
                      aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aTrackRegion ) )
                 maTrackRect = aTrackRegion;
             else
-                maTrackRect = maBtn1Rect;
+            {
+                maTrackRect = tools::Rectangle( maBtn1Rect.TopRight(), maBtn2Rect.BottomLeft() );
+                maTrackRect.Justify();
+            }
 
             // Check if available space is big enough for thumb ( min thumb size = ScrBar width/height )
             mnThumbPixRange = maTrackRect.Right() - maTrackRect.Left();
@@ -307,8 +310,8 @@ void ScrollBar::ImplCalc( bool bUpdate )
                 maTrackRect = aTrackRegion;
             else
             {
-                maTrackRect = maBtn1Rect;
-                maTrackRect.AdjustTop(1);
+                maTrackRect = tools::Rectangle( maBtn1Rect.BottomLeft()+Point(0,1), maBtn2Rect.TopRight() );
+                maTrackRect.Justify();
             }
 
             // Check if available space is big enough for thumb


More information about the Libreoffice-commits mailing list