enhance: ignores $ char when measuring contents in NamedHighlightedTextBlock

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2025-06-03 14:12:23 +08:00
parent 6517e78ab6
commit ee2e7d0127

View File

@@ -55,9 +55,10 @@ namespace SourceGit.Views
if (string.IsNullOrEmpty(text))
return base.MeasureOverride(availableSize);
var trimmed = text.Replace("$", "");
var typeface = new Typeface(FontFamily);
var formatted = new FormattedText(
Text,
trimmed,
CultureInfo.CurrentCulture,
FlowDirection.LeftToRight,
typeface,