diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-05-04 00:03:40 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-05-04 00:03:40 +0200 |
commit | 383cea0c26d905b1f4397da114a8b8b43ca48f28 (patch) | |
tree | 7102f74252904cf1980d85156c8ebb60b8bd34c7 /src/gui/fpg_style.pas | |
parent | f26ff1b582e247d3061e190839592cfb53234aeb (diff) | |
download | fpGUI-383cea0c26d905b1f4397da114a8b8b43ca48f28.tar.xz |
Prototype style: implement "draw focus rect" from scratch.
Diffstat (limited to 'src/gui/fpg_style.pas')
-rw-r--r-- | src/gui/fpg_style.pas | 13 |
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 } |