diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-04-16 16:28:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-04-16 20:32:32 +0200 |
commit | c83cde1dd8f6c17b8cd17e0c6d7cef9be2598f43 (patch) | |
tree | 131b643ea15e7098fda83ca8a12d4282f49f7c1f /vcl | |
parent | 499dbbeeca3745217e3ee5e7d70ead496a583a8c (diff) |
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@collabora.co.uk>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/scrbar.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
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 |