ux: style for branch tree node

This commit is contained in:
leo 2024-08-29 11:20:44 +08:00
parent d794a61196
commit 4dadf7afb6
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View file

@ -56,11 +56,11 @@
<TextBlock Grid.Column="1"
Text="{Binding Name}"
Classes="primary"
FontWeight="{Binding NameFontWeight}"/>
FontWeight="{Binding NameFontWeight}"
TextTrimming="CharacterEllipsis"/>
<!-- Tracking status -->
<v:BranchTreeNodeTrackStatusPresenter Grid.Column="2"
Margin="8,0"
VerticalAlignment="Center"
FontFamily="{DynamicResource Fonts.Monospace}"
FontSize="10"

View file

@ -161,8 +161,8 @@ namespace SourceGit.Views
if (_label != null)
{
context.DrawRectangle(Background, null, new RoundedRect(new Rect(0, 0, _label.Width + 18, 18), new CornerRadius(9)));
context.DrawText(_label, new Point(9, 9 - _label.Height * 0.5));
context.DrawRectangle(Background, null, new RoundedRect(new Rect(8, 0, _label.Width + 18, 18), new CornerRadius(9)));
context.DrawText(_label, new Point(17, 9 - _label.Height * 0.5));
}
}
@ -192,7 +192,7 @@ namespace SourceGit.Views
}
}
return _label != null ? new Size(_label.Width + 18, 18) : new Size(0, 0);
return _label != null ? new Size(_label.Width + 18 /* Padding */ + 16 /* Margin */, 18) : new Size(0, 0);
}
private FormattedText _label = null;