From bb4616fa1af67de6012a714fe7158b61fa1b0c1a Mon Sep 17 00:00:00 2001 From: graemeg Date: Tue, 7 Aug 2007 15:24:30 +0000 Subject: * Changed the parameters of DrawRectangle, FillRectangle to rather use Width and Height. * DrawLine and DrawRectangle now use the same coordinate system as Windows does. * I need to fixed corrupted painting in widgets due to this. --- src/gui/gui_combobox.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/gui_combobox.pas') diff --git a/src/gui/gui_combobox.pas b/src/gui/gui_combobox.pas index 3d13e6ae..8b3684b9 100644 --- a/src/gui/gui_combobox.pas +++ b/src/gui/gui_combobox.pas @@ -268,7 +268,7 @@ begin // inherited HandlePaint; Canvas.ClearClipRect; r := Rect(0, 0, Width-1, Height-1); - Canvas.DrawControlFrame(0, 0, Width, Height); + Canvas.DrawControlFrame(0, 0, Width-1, Height-1); // internal background rectangle (without frame) InflateRect(r, -2, -2); @@ -278,7 +278,8 @@ begin Canvas.SetColor(FBackgroundColor) else Canvas.SetColor(clWindowBackground); - Canvas.FillRectangle(r); + Canvas.FillRectangle(r.Left, r.Top, Width-4, Height-4); +// Canvas.FillRectangle(r); // fpgStyle.DrawButtonFace(canvas, width - min(height, 20)-3, 2, height-4, height-4, [btnIsEmbedded]); // fpgStyle.DrawDirectionArrow(canvas, width - height + 1, 1, height-2, height-2, 1); -- cgit v1.2.3-70-g09d2