mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +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.Data.Converters;
|
||||||
|
using Avalonia.Media;
|
||||||
|
|
||||||
namespace SourceGit.Converters
|
namespace SourceGit.Converters
|
||||||
{
|
{
|
||||||
|
@ -6,5 +7,8 @@ namespace SourceGit.Converters
|
||||||
{
|
{
|
||||||
public static readonly FuncValueConverter<bool, double> ToPageTabWidth =
|
public static readonly FuncValueConverter<bool, double> ToPageTabWidth =
|
||||||
new FuncValueConverter<bool, double>(x => x ? 200 : double.NaN);
|
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"
|
<TextBlock Grid.Column="1"
|
||||||
Classes="primary"
|
Classes="primary"
|
||||||
Text="{Binding Name}"
|
Text="{Binding Name}"
|
||||||
|
FontWeight="{Binding IsCurrent, Converter={x:Static c:BoolConverters.IsBoldToFontWeight}}"
|
||||||
TextTrimming="CharacterEllipsis"/>
|
TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue