mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
Refactor properties highlighting for consistency and clarity
This commit is contained in:
@@ -50,13 +50,13 @@ public class PropertiesHighlightingDefinition : DarkHighlightingDefinition
|
||||
Name = "Comment",
|
||||
Foreground = new SimpleHighlightingBrush("#6A9949".ToColor()),
|
||||
},
|
||||
_ => null
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
public override IEnumerable<HighlightingColor> NamedHighlightingColors =>
|
||||
[
|
||||
GetNamedColor("Comment")
|
||||
GetNamedColor("Comment"),
|
||||
];
|
||||
|
||||
public override DocumentColorizingTransformer[] LineTransformers { get; } = [new KeyHighlighter()];
|
||||
@@ -75,7 +75,10 @@ public class PropertiesHighlightingDefinition : DarkHighlightingDefinition
|
||||
if (idx <= 0)
|
||||
return;
|
||||
|
||||
ChangeLinePart(line.Offset, line.Offset + idx, el => el.TextRunProperties.SetForegroundBrush("#3F9CD6".ToBrush()));
|
||||
ChangeLinePart(line.Offset, line.Offset + idx, el =>
|
||||
{
|
||||
el.TextRunProperties.SetForegroundBrush("#3F9CD6".ToBrush());
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -51,13 +51,13 @@ public class PropertiesHighlightingDefinition : LightHighlightingDefinition
|
||||
Name = "Comment",
|
||||
Foreground = new SimpleHighlightingBrush(Colors.Green),
|
||||
},
|
||||
_ => null
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
public override IEnumerable<HighlightingColor> NamedHighlightingColors =>
|
||||
[
|
||||
GetNamedColor("Comment")
|
||||
GetNamedColor("Comment"),
|
||||
];
|
||||
|
||||
public override DocumentColorizingTransformer[] LineTransformers { get; } = [new KeyHighlighter()];
|
||||
@@ -76,7 +76,10 @@ public class PropertiesHighlightingDefinition : LightHighlightingDefinition
|
||||
if (idx <= 0)
|
||||
return;
|
||||
|
||||
ChangeLinePart(line.Offset, line.Offset + idx, el => el.TextRunProperties.SetForegroundBrush(Colors.Blue.ToBrush()));
|
||||
ChangeLinePart(line.Offset, line.Offset + idx, el =>
|
||||
{
|
||||
el.TextRunProperties.SetForegroundBrush(Colors.Blue.ToBrush());
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user