mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
ux: use bold font weight for current branch name (#997)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
af4645a4ad
commit
3d4a9b86b4
2 changed files with 5 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace SourceGit.Converters
|
||||
{
|
||||
|
@ -6,5 +7,8 @@ namespace SourceGit.Converters
|
|||
{
|
||||
public static readonly FuncValueConverter<bool, double> ToPageTabWidth =
|
||||
new FuncValueConverter<bool, double>(x => x ? 200 : double.NaN);
|
||||
|
||||
public static readonly FuncValueConverter<bool, FontWeight> IsBoldToFontWeight =
|
||||
new FuncValueConverter<bool, FontWeight>(x => x ? FontWeight.Bold : FontWeight.Normal);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
<TextBlock Grid.Column="1"
|
||||
Classes="primary"
|
||||
Text="{Binding Name}"
|
||||
FontWeight="{Binding IsCurrent, Converter={x:Static c:BoolConverters.IsBoldToFontWeight}}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue