Skip to content

Commit 4dadf7a

Browse files
committed
ux: style for branch tree node
1 parent d794a61 commit 4dadf7a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Views/BranchTree.axaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656
<TextBlock Grid.Column="1"
5757
Text="{Binding Name}"
5858
Classes="primary"
59-
FontWeight="{Binding NameFontWeight}"/>
59+
FontWeight="{Binding NameFontWeight}"
60+
TextTrimming="CharacterEllipsis"/>
6061

6162
<!-- Tracking status -->
6263
<v:BranchTreeNodeTrackStatusPresenter Grid.Column="2"
63-
Margin="8,0"
6464
VerticalAlignment="Center"
6565
FontFamily="{DynamicResource Fonts.Monospace}"
6666
FontSize="10"

src/Views/BranchTree.axaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ public override void Render(DrawingContext context)
161161

162162
if (_label != null)
163163
{
164-
context.DrawRectangle(Background, null, new RoundedRect(new Rect(0, 0, _label.Width + 18, 18), new CornerRadius(9)));
165-
context.DrawText(_label, new Point(9, 9 - _label.Height * 0.5));
164+
context.DrawRectangle(Background, null, new RoundedRect(new Rect(8, 0, _label.Width + 18, 18), new CornerRadius(9)));
165+
context.DrawText(_label, new Point(17, 9 - _label.Height * 0.5));
166166
}
167167
}
168168

@@ -192,7 +192,7 @@ protected override Size MeasureOverride(Size availableSize)
192192
}
193193
}
194194

195-
return _label != null ? new Size(_label.Width + 18, 18) : new Size(0, 0);
195+
return _label != null ? new Size(_label.Width + 18 /* Padding */ + 16 /* Margin */, 18) : new Size(0, 0);
196196
}
197197

198198
private FormattedText _label = null;

0 commit comments

Comments
 (0)