mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-07 20:04:59 +00:00
refactor: use DataTemplates
instead of create NamedHighlightedTextBlock
manually for menu item (#1216)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
5fd074a9b6
commit
41416a6bed
7 changed files with 69 additions and 68 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue