diff options
Diffstat (limited to 'src/corelib')
-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; |