summaryrefslogtreecommitdiff
path: root/src/gui/fpg_listbox.pas
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2013-12-01 10:45:48 +0000
committerGraeme Geldenhuys <graemeg@gmail.com>2013-12-01 10:45:48 +0000
commit5c9ead6b58ae4044d3d6236ef0e97cd945962f6c (patch)
treedfbac20cc4bcba9b9d1d33e5c7a9db6b4f6d871b /src/gui/fpg_listbox.pas
parent29769c9d36636e48933350d4c147cbd358b9b657 (diff)
downloadfpGUI-5c9ead6b58ae4044d3d6236ef0e97cd945962f6c.tar.xz
Fixing Listbox hard-coded border width - fixes theming issues.
As with the ComboBox before, the ListBox hard-coded a 2px border, instead of querying the fpgStyle for the theme's border widths.
Diffstat (limited to 'src/gui/fpg_listbox.pas')
-rw-r--r--src/gui/fpg_listbox.pas6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/fpg_listbox.pas b/src/gui/fpg_listbox.pas
index 082288a8..757ada54 100644
--- a/src/gui/fpg_listbox.pas
+++ b/src/gui/fpg_listbox.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2010 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,
@@ -673,6 +673,7 @@ procedure TfpgBaseListBox.HandlePaint;
var
n: integer;
r: TfpgRect;
+ rect: TRect;
begin
//if FUpdateCount > 0 then
// Exit; //==>
@@ -692,7 +693,8 @@ begin
else
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;
Canvas.SetClipRect(r);