summaryrefslogtreecommitdiff
path: root/src/gui/fpg_scrollbar.pas
diff options
context:
space:
mode:
authorJean-Marc.Levecque <jmarc.levecque@dbmail.com>2014-03-17 21:40:17 +0000
committerGraeme Geldenhuys <graemeg@gmail.com>2014-03-17 21:40:17 +0000
commit8bdb84192eb9acc4fe12826db8462a81f7c1dc6f (patch)
tree41b25be6ff856e93943785f46353f852c27c9540 /src/gui/fpg_scrollbar.pas
parent99583c8178314d4357b350f55952f0739bb0c0ee (diff)
downloadfpGUI-8bdb84192eb9acc4fe12826db8462a81f7c1dc6f.tar.xz
scrollbar: bug fix painting shadow (grey) area between slider and arrow buttons
Diffstat (limited to 'src/gui/fpg_scrollbar.pas')
-rw-r--r--src/gui/fpg_scrollbar.pas8
1 files changed, 4 insertions, 4 deletions
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;