summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2013-12-17 21:59:54 +0000
committerGraeme Geldenhuys <graemeg@gmail.com>2013-12-17 21:59:54 +0000
commitc0f46bd41032ce68655b0999d15933ca995ac491 (patch)
tree62b7fb741b5f7ed5a211cd2329bfa623ebb5b2c3 /src/gui
parentc7a89b9159d66ace759f33bfe32ef2ccd58394cd (diff)
downloadfpGUI-c0f46bd41032ce68655b0999d15933ca995ac491.tar.xz
basegrid: removed hard-coded control frame size values.
The grid used to use hard-code control frame sizes. Now it queries the current theme, and uses those returned values accordingly.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/fpg_basegrid.pas8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/fpg_basegrid.pas b/src/gui/fpg_basegrid.pas
index ebfaa074..6f262331 100644
--- a/src/gui/fpg_basegrid.pas
+++ b/src/gui/fpg_basegrid.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2012 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -52,8 +52,6 @@ type
// Column 2 is special just for testing purposes. Descendant classes will
// override that special behavior anyway.
- { TfpgBaseGrid }
-
TfpgBaseGrid = class(TfpgWidget)
private
FColResizing: boolean;
@@ -779,6 +777,7 @@ var
rTop: integer;
firstcol, lastcol, firstrow, lastrow : integer;
cWidths: array of integer;
+ rect: TRect;
begin
Canvas.ClearClipRect;
@@ -791,7 +790,8 @@ begin
ebsDefault:
begin
fpgStyle.DrawControlFrame(Canvas, r);
- InflateRect(r, -2, -2);
+ rect := fpgStyle.GetControlFrameBorders;
+ InflateRect(r, -rect.Left, -rect.Top); { assuming borders are even on opposite sides }
end;
ebsSingle:
begin