mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 02:38:40 +02:00
LCL: Don't modify hint position when it is shown via calling HintWindow.ActivateWithBounds method (useful for SynEdit).
Also cleanup useless FActivating assignment (it is a simple field without any side effects).
This commit is contained in:
parent
add8755ea8
commit
301fcda550
@ -241,14 +241,9 @@ procedure THintWindow.ActivateHint(const AHint: String);
|
||||
begin
|
||||
if FActivating then exit;
|
||||
|
||||
AdjustBoundsForMonitor;
|
||||
|
||||
if Visible and (Caption=AHint)
|
||||
and EqualRect(FHintRect, BoundsRect) then
|
||||
begin
|
||||
FActivating := FActivating;
|
||||
Exit; // nothing changed, exit -> don't flicker
|
||||
end;
|
||||
|
||||
FActivating := True;
|
||||
try
|
||||
@ -265,9 +260,12 @@ end;
|
||||
procedure THintWindow.ActivateHint(ARect: TRect; const AHint: String);
|
||||
begin
|
||||
HintRect := ARect;
|
||||
AdjustBoundsForMonitor;
|
||||
ActivateHint(AHint);
|
||||
end;
|
||||
|
||||
// The purpose of this method is to allow showing a hint without
|
||||
// adjusting its position via AdjustBoundsForMonitor call.
|
||||
procedure THintWindow.ActivateWithBounds(ARect: TRect; const AHint: String);
|
||||
begin
|
||||
HintRect := ARect;
|
||||
@ -277,6 +275,7 @@ end;
|
||||
procedure THintWindow.ActivateHintData(ARect: TRect; const AHint: String; AData: pointer);
|
||||
begin
|
||||
HintRect := ARect;
|
||||
AdjustBoundsForMonitor;
|
||||
ActivateHint(AHint); // AData is not used now.
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user