mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 20:19:24 +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).
(cherry picked from commit 301fcda550
)
This commit is contained in:
parent
3989144ccb
commit
5b60a5e128
@ -241,14 +241,9 @@ procedure THintWindow.ActivateHint(const AHint: String);
|
|||||||
begin
|
begin
|
||||||
if FActivating then exit;
|
if FActivating then exit;
|
||||||
|
|
||||||
AdjustBoundsForMonitor;
|
|
||||||
|
|
||||||
if Visible and (Caption=AHint)
|
if Visible and (Caption=AHint)
|
||||||
and EqualRect(FHintRect, BoundsRect) then
|
and EqualRect(FHintRect, BoundsRect) then
|
||||||
begin
|
|
||||||
FActivating := FActivating;
|
|
||||||
Exit; // nothing changed, exit -> don't flicker
|
Exit; // nothing changed, exit -> don't flicker
|
||||||
end;
|
|
||||||
|
|
||||||
FActivating := True;
|
FActivating := True;
|
||||||
try
|
try
|
||||||
@ -265,9 +260,12 @@ end;
|
|||||||
procedure THintWindow.ActivateHint(ARect: TRect; const AHint: String);
|
procedure THintWindow.ActivateHint(ARect: TRect; const AHint: String);
|
||||||
begin
|
begin
|
||||||
HintRect := ARect;
|
HintRect := ARect;
|
||||||
|
AdjustBoundsForMonitor;
|
||||||
ActivateHint(AHint);
|
ActivateHint(AHint);
|
||||||
end;
|
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);
|
procedure THintWindow.ActivateWithBounds(ARect: TRect; const AHint: String);
|
||||||
begin
|
begin
|
||||||
HintRect := ARect;
|
HintRect := ARect;
|
||||||
@ -277,6 +275,7 @@ end;
|
|||||||
procedure THintWindow.ActivateHintData(ARect: TRect; const AHint: String; AData: pointer);
|
procedure THintWindow.ActivateHintData(ARect: TRect; const AHint: String; AData: pointer);
|
||||||
begin
|
begin
|
||||||
HintRect := ARect;
|
HintRect := ARect;
|
||||||
|
AdjustBoundsForMonitor;
|
||||||
ActivateHint(AHint); // AData is not used now.
|
ActivateHint(AHint); // AData is not used now.
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user