diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-12-17 22:10:53 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-12-17 22:10:53 +0000 |
commit | 1d50cfd4b3808b805443c9b59c6260a29ce6519f (patch) | |
tree | e1341908e5a79a050b7e70c24c473cbb82b72f4b | |
parent | 72effbfa1e39d99769202cb50c77cd305467c632 (diff) | |
download | fpGUI-1d50cfd4b3808b805443c9b59c6260a29ce6519f.tar.xz |
editcombo: Removed hard-coded control frame sizes
Instead the widget now queries the current style for those values.
-rw-r--r-- | src/gui/fpg_editcombo.pas | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/fpg_editcombo.pas b/src/gui/fpg_editcombo.pas index 13d90b22..8236b7d5 100644 --- a/src/gui/fpg_editcombo.pas +++ b/src/gui/fpg_editcombo.pas @@ -726,6 +726,7 @@ end; procedure TfpgBaseEditCombo.HandlePaint; var r: TfpgRect; + rect: TRect; tw, tw2, st, len: integer; Texte: string; @@ -774,9 +775,8 @@ begin 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 |