Ast list nodes

This commit is contained in:
Michael Schimmel
2025-11-29 18:59:16 +01:00
parent 250f950a68
commit 851f56c63f
24 changed files with 1819 additions and 863 deletions
+12 -5
View File
@@ -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