From 29769c9d36636e48933350d4c147cbd358b9b657 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sun, 1 Dec 2013 10:23:12 +0000 Subject: 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. --- src/gui/fpg_combobox.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/fpg_combobox.pas') 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 -- cgit v1.2.3-70-g09d2