diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-31 09:44:32 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-31 09:44:32 +0000 |
commit | 0fdfd9d1251f47d40a4fa9fc3d4599ef713a7999 (patch) | |
tree | c39b544202d4db5d3d871d84391935758bc7a181 /src/gui/gui_edit.pas | |
parent | 0e2ffba0302d927fa856cbd62f725417714cc74c (diff) | |
download | fpGUI-0fdfd9d1251f47d40a4fa9fc3d4599ef713a7999.tar.xz |
* Fixed FillRectangle() under GDI and X11.
* Implemented Enable/Disbled state in TfpgComboBox.
* Fixed painting issues in TfpgScrollbar and TfpgMemo (tested
under X11).
* Moved SetEnabled and SetVisible in TfpgWidget to protected
and virtual.
Diffstat (limited to 'src/gui/gui_edit.pas')
-rw-r--r-- | src/gui/gui_edit.pas | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/gui_edit.pas b/src/gui/gui_edit.pas index 02710088..2597f976 100644 --- a/src/gui/gui_edit.pas +++ b/src/gui/gui_edit.pas @@ -207,17 +207,18 @@ var begin Canvas.BeginDraw; Canvas.ClearClipRect; + r := Rect(0, 0, Width-1, Height-1); Canvas.DrawControlFrame(0, 0, Width, Height); - r := Rect(2, 2, Width-2, Height-2); + InflateRect(r, -2, -2); Canvas.SetClipRect(r); if Enabled then Canvas.SetColor(FBackgroundColor) else Canvas.SetColor(clWindowBackground); - Canvas.FillRectAngle(r); + dtext := GetDrawText; Canvas.SetTextColor(clText1); Canvas.SetFont(FFont); @@ -244,7 +245,7 @@ begin // drawing cursor tw := FFont.TextWidth(UTF8copy(dtext, 1, FCursorPos)); - fpgCaret.SetCaret(Canvas, -FDrawOffset + FSideMargin + tw, 3, 2, FFont.Height - 1); + fpgCaret.SetCaret(Canvas, -FDrawOffset + FSideMargin + tw, 3, fpgCaret.Width, FFont.Height); end else fpgCaret.UnSetCaret(Canvas); |