summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2013-04-26 00:38:15 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2013-04-26 00:41:02 +0100
commitc508cc7ea078653921030a9497da2267d8825faf (patch)
treebd824ce9f63104cae065a60a91d24bc8213fee23 /src/gui
parent54eb884a10023e00444964dee4ee6cd2126aad94 (diff)
downloadfpGUI-c508cc7ea078653921030a9497da2267d8825faf.tar.xz
trackbar: Implements vertical orientation
For some reason it was never implemented before!! Oops.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/fpg_trackbar.pas12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/fpg_trackbar.pas b/src/gui/fpg_trackbar.pas
index ad997817..d9b9db56 100644
--- a/src/gui/fpg_trackbar.pas
+++ b/src/gui/fpg_trackbar.pas
@@ -439,7 +439,7 @@ begin
if Orientation = orVertical then
begin
- if (y >= Width + FSliderPos) and (y <= Width + FSliderPos + FSliderLength) then
+ if (y >= FSliderPos) and (y <= FSliderPos + FSliderLength) then
begin
FSliderDragging := True;
FSliderDragPos := y;
@@ -571,7 +571,15 @@ begin
if Orientation = orVertical then
begin
- Canvas.DrawButtonFace(0, Width + FSliderPos, Width, FSliderLength, [btfIsEmbedded]);
+ r.SetRect((Width-4) div 2, 1, 4, Height {- tw} - 4);
+ Canvas.DrawControlFrame(r);
+ r.SetRect((Width-20) div 2, FSliderPos, 21, FSliderLength);
+ Canvas.DrawButtonFace(r, []);
+ //if FShowPosition then
+ //begin
+ // Canvas.SetTextColor(TextColor);
+ // fpgStyle.DrawString(Canvas, Width - tw, (Height - FFont.Height) div 2, IntToStr(Position), Enabled);
+ //end;
end
else
begin