refactor: use DataTemplates instead of create NamedHighlightedTextBlock manually for menu item (#1216)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-04-20 11:05:24 +08:00
parent 5fd074a9b6
commit 41416a6bed
No known key found for this signature in database
7 changed files with 69 additions and 68 deletions

View file

@ -49,12 +49,6 @@ namespace SourceGit.Views
AffectsMeasure<NameHighlightedTextBlock>(TextProperty);
}
public NameHighlightedTextBlock(string nameKey, params object[] args)
{
SetCurrentValue(TextProperty, App.Text(nameKey, args));
VerticalAlignment = Avalonia.Layout.VerticalAlignment.Center;
}
protected override Size MeasureOverride(Size availableSize)
{
var text = Text;