summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-05-04 00:03:40 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-05-04 00:03:40 +0200
commit383cea0c26d905b1f4397da114a8b8b43ca48f28 (patch)
tree7102f74252904cf1980d85156c8ebb60b8bd34c7
parentf26ff1b582e247d3061e190839592cfb53234aeb (diff)
downloadfpGUI-383cea0c26d905b1f4397da114a8b8b43ca48f28.tar.xz
Prototype style: implement "draw focus rect" from scratch.
-rw-r--r--src/gui/fpg_style.pas13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/fpg_style.pas b/src/gui/fpg_style.pas
index f6538a81..615ec397 100644
--- a/src/gui/fpg_style.pas
+++ b/src/gui/fpg_style.pas
@@ -294,7 +294,18 @@ begin
begin
r.SetRect(option.Rect.Left, option.Rect.Top, option.Rect.Width, option.Rect.Height);
InflateRect(r, -3, -3);
- Canvas.DrawFocusRect(r);
+
+ oldColor := Canvas.Color;
+ oldLineWidth := Canvas.LineWidth;
+ oldLineStyle := Canvas.LineStyle;
+
+ Canvas.SetColor(clText1);
+ Canvas.SetLineStyle(1, lsDot);
+ Canvas.DrawRectangle(r);
+
+ // restore previous settings
+ Canvas.SetColor(oldColor);
+ Canvas.SetLineStyle(oldLineWidth, oldLineStyle);
end;
end; { peFocusRectangle }