From 8bdb84192eb9acc4fe12826db8462a81f7c1dc6f Mon Sep 17 00:00:00 2001 From: "Jean-Marc.Levecque" Date: Mon, 17 Mar 2014 21:40:17 +0000 Subject: scrollbar: bug fix painting shadow (grey) area between slider and arrow buttons --- src/gui/fpg_scrollbar.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui') diff --git a/src/gui/fpg_scrollbar.pas b/src/gui/fpg_scrollbar.pas index 440372dd..3883d3b6 100644 --- a/src/gui/fpg_scrollbar.pas +++ b/src/gui/fpg_scrollbar.pas @@ -370,12 +370,12 @@ begin if Orientation = orVertical then begin - Canvas.FillRectangle(0, Width, Width, Height-Width-Width); + Canvas.FillRectangle(0, Width, Width, Height - (2 * Width)); area := Height - (Width shl 1); end else begin - Canvas.FillRectangle(Height, 0, Width-Height-Height, Height); + Canvas.FillRectangle(Height, 0, Width - (2 * Height), Height); area := Width - (Height shl 1); end; @@ -412,7 +412,7 @@ begin else if FScrollbarDownPart in [{sbpDownForward,} sbpPageDownForward] then begin Canvas.SetColor(clShadow1); - Canvas.FillRectangle(0, FSliderPos + FSliderLength, Width, Height - Width - (FSliderPos + FSliderLength)); + Canvas.FillRectangle(0, Width + FSliderPos + FSliderLength, Width, Height - (2 * Width) - (FSliderPos + FSliderLength)); Canvas.SetColor(clScrollBar); end; end @@ -427,7 +427,7 @@ begin else if FScrollbarDownPart in [{sbpDownForward,} sbpPageDownForward] then begin Canvas.SetColor(clShadow1); - Canvas.FillRectangle(FSliderPos + FSliderLength, 0, Width - Height - (FSliderPos + FSliderLength), Height); + Canvas.FillRectangle(Height + FSliderPos + FSliderLength, 0, Width - (2 * Height) - (FSliderPos + FSliderLength), Height); Canvas.SetColor(clScrollBar); end; end; -- cgit v1.2.3-70-g09d2