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

New commits:
commit c83cde1dd8f6c17b8cd17e0c6d7cef9be2598f43
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Apr 16 16:28:32 2020 +0100
Commit:     Caolán McNamara <caol...@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.gran...@collabora.co.uk>
    Reviewed-by: Caolán McNamara <caol...@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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to