mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-22 04:59:26 +02:00
Change cursor shape from "beam" to "hand" when hovering over "mouse link" in source editor. from Alexander Klenin
git-svn-id: trunk@9640 -
This commit is contained in:
parent
c5fe5ea2b5
commit
de49382304
@ -2376,20 +2376,21 @@ var
|
|||||||
Z: integer;
|
Z: integer;
|
||||||
begin
|
begin
|
||||||
inherited MouseMove(Shift, x, y);
|
inherited MouseMove(Shift, x, y);
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
LastMouseCaret:=PixelsToRowColumn(Point(X,Y));
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
if (X >= fGutterWidth)
|
if (X >= fGutterWidth)
|
||||||
and (X < ClientWidth{$IFDEF SYN_LAZARUS}-ScrollBarWidth{$ENDIF})
|
and (X < ClientWidth{$IFDEF SYN_LAZARUS}-ScrollBarWidth{$ENDIF})
|
||||||
and (Y >= 0)
|
and (Y >= 0)
|
||||||
and (Y < ClientHeight{$IFDEF SYN_LAZARUS}-ScrollBarWidth{$ENDIF})
|
and (Y < ClientHeight{$IFDEF SYN_LAZARUS}-ScrollBarWidth{$ENDIF})
|
||||||
then begin
|
then begin
|
||||||
If Cursor <> crIBeam then
|
if Cursor <> crHandPoint then
|
||||||
Cursor := crIBeam;
|
Cursor := crIBeam;
|
||||||
end else
|
end
|
||||||
If Cursor <> crDefault then
|
else
|
||||||
Cursor := crDefault;
|
Cursor := crDefault;
|
||||||
|
|
||||||
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
LastMouseCaret:=PixelsToRowColumn(Point(X,Y));
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
//debugln('TCustomSynEdit.MouseMove sfWaitForDragging=',dbgs(sfWaitForDragging in fStateFlags),' MouseCapture=',dbgs(MouseCapture),' GetCaptureControl=',DbgSName(GetCaptureControl));
|
//debugln('TCustomSynEdit.MouseMove sfWaitForDragging=',dbgs(sfWaitForDragging in fStateFlags),' MouseCapture=',dbgs(MouseCapture),' GetCaptureControl=',DbgSName(GetCaptureControl));
|
||||||
if MouseCapture
|
if MouseCapture
|
||||||
@ -6844,6 +6845,15 @@ end;
|
|||||||
|
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
procedure TCustomSynEdit.UpdateCtrlMouse;
|
procedure TCustomSynEdit.UpdateCtrlMouse;
|
||||||
|
|
||||||
|
procedure doNotShowLink;
|
||||||
|
begin
|
||||||
|
if fLastCtrlMouseLinkY>0 then begin
|
||||||
|
Invalidate;
|
||||||
|
Cursor := crIBeam;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
NewY, NewX1, NewX2: integer;
|
NewY, NewX1, NewX2: integer;
|
||||||
begin
|
begin
|
||||||
@ -6860,19 +6870,12 @@ begin
|
|||||||
or (NewX2<>fLastCtrlMouseLinkX2)
|
or (NewX2<>fLastCtrlMouseLinkX2)
|
||||||
then begin
|
then begin
|
||||||
Invalidate;
|
Invalidate;
|
||||||
|
Cursor := crHandPoint;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else
|
||||||
// there is no link -> do not show link
|
doNotShowLink // there is no link
|
||||||
if fLastCtrlMouseLinkY>0 then begin
|
end else
|
||||||
Invalidate;
|
doNotShowLink;
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end else begin
|
|
||||||
// do not show link
|
|
||||||
if fLastCtrlMouseLinkY>0 then begin
|
|
||||||
Invalidate;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user