mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 18:19:07 +02:00
IDE: revert forgotten part of r52410 #ba927319a4 - fixes IDE smart hint show/hide issues.
git-svn-id: trunk@54452 -
This commit is contained in:
parent
fa015f899a
commit
431b58c609
@ -2023,27 +2023,6 @@ begin
|
|||||||
FAutoHideHintTimer.Enabled := False;
|
FAutoHideHintTimer.Enabled := False;
|
||||||
if HintIsVisible then begin
|
if HintIsVisible then begin
|
||||||
Cur := Mouse.CursorPos; // Desktop coordinates
|
Cur := Mouse.CursorPos; // Desktop coordinates
|
||||||
|
|
||||||
hw := CurHintWindow;
|
|
||||||
OkX := ( (FAutoHintMousePos.x <= hw.Left) and
|
|
||||||
(Cur.x > FAutoHintMousePos.x) and (Cur.x <= hw.Left + hw.Width)
|
|
||||||
) or
|
|
||||||
( (FAutoHintMousePos.x >= hw.Left + hw.Width) and
|
|
||||||
(Cur.x < FAutoHintMousePos.x) and (Cur.x >= hw.Left)
|
|
||||||
) or
|
|
||||||
( (Cur.x >= hw.Left) and (Cur.x <= hw.Left + hw.Width) );
|
|
||||||
OkY := ( (FAutoHintMousePos.y <= hw.Top) and
|
|
||||||
(Cur.y > FAutoHintMousePos.y) and (Cur.y <= hw.Top + hw.Height)
|
|
||||||
) or
|
|
||||||
( (FAutoHintMousePos.y >= hw.Top + hw.Height) and
|
|
||||||
(Cur.y < FAutoHintMousePos.y) and (Cur.y >= hw.Top)
|
|
||||||
) or
|
|
||||||
( (Cur.y >= hw.Top) and (Cur.y <= hw.Top + hw.Height) );
|
|
||||||
|
|
||||||
// Update FAutoHintMousePos, if outside the HintWin, and new CurPos is closer to HintWin
|
|
||||||
if OkX then FAutoHintMousePos.x := Cur.x;
|
|
||||||
if OkY then FAutoHintMousePos.y := Cur.y;
|
|
||||||
|
|
||||||
if (not IsRectEmpty(FScreenRect)) then
|
if (not IsRectEmpty(FScreenRect)) then
|
||||||
begin
|
begin
|
||||||
// Do not close, if mouse still over the same word, that triggered the hint
|
// Do not close, if mouse still over the same word, that triggered the hint
|
||||||
@ -2051,7 +2030,26 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
// Fallback if FScreenRect is empty
|
// Fallback if FScreenRect is empty (for legacy calls)
|
||||||
|
hw := CurHintWindow;
|
||||||
|
OkX := ( (FAutoHintMousePos.x <= hw.Left) and
|
||||||
|
(Cur.x > FAutoHintMousePos.x) and (Cur.x <= hw.Left + hw.Width)
|
||||||
|
) or
|
||||||
|
( (FAutoHintMousePos.x >= hw.Left + hw.Width) and
|
||||||
|
(Cur.x < FAutoHintMousePos.x) and (Cur.x >= hw.Left)
|
||||||
|
) or
|
||||||
|
( (Cur.x >= hw.Left) and (Cur.x <= hw.Left + hw.Width) );
|
||||||
|
OkY := ( (FAutoHintMousePos.y <= hw.Top) and
|
||||||
|
(Cur.y > FAutoHintMousePos.y) and (Cur.y <= hw.Top + hw.Height)
|
||||||
|
) or
|
||||||
|
( (FAutoHintMousePos.y >= hw.Top + hw.Height) and
|
||||||
|
(Cur.y < FAutoHintMousePos.y) and (Cur.y >= hw.Top)
|
||||||
|
) or
|
||||||
|
( (Cur.y >= hw.Top) and (Cur.y <= hw.Top + hw.Height) );
|
||||||
|
|
||||||
|
if OkX then FAutoHintMousePos.x := Cur.x;
|
||||||
|
if OkY then FAutoHintMousePos.y := Cur.y;
|
||||||
|
|
||||||
OkX := OkX or
|
OkX := OkX or
|
||||||
( (FAutoHintMousePos.x <= hw.Left + MaxJitter) and
|
( (FAutoHintMousePos.x <= hw.Left + MaxJitter) and
|
||||||
(Cur.x > FAutoHintMousePos.x - MaxJitter) and (Cur.x <= hw.Left + hw.Width + MaxJitter)
|
(Cur.x > FAutoHintMousePos.x - MaxJitter) and (Cur.x <= hw.Left + hw.Width + MaxJitter)
|
||||||
|
Loading…
Reference in New Issue
Block a user