summaryrefslogtreecommitdiff
path: root/src/gui/fpg_combobox.pas
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2013-12-01 10:23:12 +0000
committerGraeme Geldenhuys <graemeg@gmail.com>2013-12-01 10:23:12 +0000
commit29769c9d36636e48933350d4c147cbd358b9b657 (patch)
treec85ca13e1d126921bfbf8f842cda7a829624c67e /src/gui/fpg_combobox.pas
parente513430c75a661e2bc18889e7de5269a683b73a0 (diff)
downloadfpGUI-29769c9d36636e48933350d4c147cbd358b9b657.tar.xz
Fixes hard-coded widget border size - fixes theming issues
The ComboBox widget never asked the fpgStyle the size of the theme border, and always assumed 2px, which was wrong. It now correctly queries the fpgStyle (current theme) for the border sizes.
Diffstat (limited to 'src/gui/fpg_combobox.pas')
-rw-r--r--src/gui/fpg_combobox.pas6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/fpg_combobox.pas b/src/gui/fpg_combobox.pas
index 15dae337..47195b5b 100644
--- a/src/gui/fpg_combobox.pas
+++ b/src/gui/fpg_combobox.pas
@@ -727,14 +727,14 @@ end;
procedure TfpgBaseStaticCombo.HandlePaint;
var
r: TfpgRect;
+ rect: TRect;
begin
// inherited HandlePaint;
Canvas.ClearClipRect;
r.SetRect(0, 0, Width, Height);
fpgStyle.DrawControlFrame(Canvas, r);
-
- // internal background rectangle (without frame)
- InflateRect(r, -2, -2);
+ rect := fpgStyle.GetControlFrameBorders;
+ InflateRect(r, -rect.Left, -rect.Top); { assuming borders are even on opposite sides }
Canvas.SetClipRect(r);
if Enabled then