mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 07:58:07 +02:00
lcl: hintwindow: reduce flicker when changing hint
git-svn-id: trunk@52371 -
This commit is contained in:
parent
744b5e7ca8
commit
dc2843ca68
@ -215,11 +215,19 @@ procedure THintWindow.ActivateHint(const AHint: String);
|
||||
// Shows simple text hint.
|
||||
begin
|
||||
if FActivating then exit;
|
||||
|
||||
if Visible and (Caption=AHint)
|
||||
and EqualRect(FHintRect, BoundsRect) then
|
||||
begin
|
||||
FActivating := FActivating;
|
||||
Exit; // nothing changed, exit -> don't flicker
|
||||
end;
|
||||
|
||||
FActivating := True;
|
||||
try
|
||||
Assert(ControlCount = 0, 'THintWindow.ActivateRendered: ControlCount > 0');
|
||||
if Caption<>AHint then
|
||||
Invalidate;
|
||||
Hide; // reduce flicker and start animation if hint changed
|
||||
Caption := AHint;
|
||||
ActivateSub;
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user