diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-09-25 14:30:34 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-09-25 14:30:34 +0000 |
commit | 8c3e24bb6e82a8ebebfaf05437a780ffa0f2c7f6 (patch) | |
tree | 75640331207ea228e4ae4f535dbbd931ad4f94e5 /src | |
parent | 58915755b97069c8ba2ba10367e461bdb163d517 (diff) | |
download | fpGUI-8c3e24bb6e82a8ebebfaf05437a780ffa0f2c7f6.tar.xz |
* Applied two minor fixed supplied by Jean-Marc.
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/fpgfx.pas | 3 | ||||
-rw-r--r-- | src/corelib/gfx_widget.pas | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/fpgfx.pas b/src/corelib/fpgfx.pas index bc093038..332060ba 100644 --- a/src/corelib/fpgfx.pas +++ b/src/corelib/fpgfx.pas @@ -919,6 +919,9 @@ begin wnd.Text := AHint; w := wnd.Font.TextWidth(AHint) + (wnd.Border * 2) + (wnd.Margin * 2); h := wnd.Font.Height + (wnd.Border * 2) + (wnd.Margin * 2); + { prevents hint from going off the right screen edge } + if (APos.X + w) > ScreenWidth then + APos.X:= ScreenWidth - w; wnd.SetPosition(APos.X, APos.Y, w, h); wnd.Show; end; diff --git a/src/corelib/gfx_widget.pas b/src/corelib/gfx_widget.pas index 5ce5bd9e..d821e6e2 100644 --- a/src/corelib/gfx_widget.pas +++ b/src/corelib/gfx_widget.pas @@ -272,7 +272,7 @@ end; procedure TfpgWidget.SetTextColor(const AValue: TfpgColor); begin - if FBackgroundColor <> AValue then + if FTextColor <> AValue then begin FTextColor := AValue; Repaint; |