Ast list nodes
This commit is contained in:
@@ -577,15 +577,22 @@ var
|
||||
effBorderWidth: Single;
|
||||
effDash: TStrokeDash;
|
||||
isHovering: Boolean;
|
||||
isBlock: Boolean;
|
||||
shouldIgnoreHover: Boolean;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
// Check if this is a block node (blocks should not highlight on hover)
|
||||
isBlock := Assigned(Node) and (Node.Kind = TAstNodeKind.akBlockExpression);
|
||||
shouldIgnoreHover := False;
|
||||
if Assigned(Node) then
|
||||
begin
|
||||
case Node.Kind of
|
||||
// Lists and Blocks should generally not be highlighted as a whole on hover
|
||||
// because they are containers for other selectable items.
|
||||
akBlockExpression, akParameterList, akArgumentList, akExpressionList, akRecordFieldList: shouldIgnoreHover := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
// Determine hover state: active only if mouse is over AND it is not a block
|
||||
isHovering := IsMouseOver and (not isBlock);
|
||||
// Determine hover state: active only if mouse is over AND it is not a container type
|
||||
isHovering := IsMouseOver and (not shouldIgnoreHover);
|
||||
|
||||
// 1. Set base values
|
||||
if FFrameless then
|
||||
|
||||
Reference in New Issue
Block a user