ux: use FontWeight.Bold for current head decorator

This commit is contained in:
leo 2024-04-02 20:42:17 +08:00
parent f0b65d4499
commit 09720f81d4
2 changed files with 9 additions and 1 deletions

View file

@ -36,5 +36,8 @@ namespace SourceGit.Converters
return Application.Current?.FindResource(key) as StreamGeometry;
});
public static readonly FuncValueConverter<Models.DecoratorType, FontWeight> ToFontWeight =
new FuncValueConverter<Models.DecoratorType, FontWeight>(v => v == Models.DecoratorType.CurrentBranchHead ? FontWeight.Bold : FontWeight.Regular);
}
}

View file

@ -54,7 +54,12 @@
VerticalAlignment="Center"/>
</Border>
<Border Background="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToBackground}}">
<TextBlock Classes="monospace" Text="{Binding Name}" FontSize="10" Margin="4,0" Foreground="Black"/>
<TextBlock Classes="monospace"
Text="{Binding Name}"
FontSize="10"
Margin="4,0"
Foreground="Black"
FontWeight="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToFontWeight}}"/>
</Border>
</StackPanel>
</Border>