mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 11:44:59 +00:00
ux: style for current branch in branch tree (#991)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
7ae5100fcf
commit
14f47a9007
2 changed files with 13 additions and 7 deletions
|
@ -40,9 +40,9 @@ namespace SourceGit.ViewModels
|
|||
get => Backend is Models.Branch;
|
||||
}
|
||||
|
||||
public FontWeight NameFontWeight
|
||||
public bool IsCurrent
|
||||
{
|
||||
get => Backend is Models.Branch { IsCurrent: true } ? FontWeight.Bold : FontWeight.Regular;
|
||||
get => Backend is Models.Branch { IsCurrent: true };
|
||||
}
|
||||
|
||||
public string Tooltip
|
||||
|
|
|
@ -57,11 +57,17 @@
|
|||
IsExpanded="{Binding IsExpanded}"/>
|
||||
|
||||
<!-- Name -->
|
||||
<Grid Grid.Column="1" ColumnDefinitions="Auto,*">
|
||||
<Border Grid.Column="0" Margin="0,0,4,0" Background="Green" Height="16" CornerRadius="8" VerticalAlignment="Center" IsVisible="{Binding IsCurrent}">
|
||||
<TextBlock Text="HEAD" Classes="primary" Margin="8,0" Foreground="#FFDDDDDD" FontSize="10" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding Name}"
|
||||
Classes="primary"
|
||||
FontWeight="{Binding NameFontWeight}"
|
||||
Text="{Binding Name}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
<!-- Tracking status -->
|
||||
<v:BranchTreeNodeTrackStatusPresenter Grid.Column="2"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue