Skip to content

Commit 24ca3ea

Browse files
committed
ux: tree folder icon margin
1 parent a807aa9 commit 24ca3ea

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Views/BranchTree.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<!-- Content Area (allows double-click) -->
6868
<Grid Grid.Column="1"
6969
Background="Transparent"
70-
ColumnDefinitions="20,*,Auto,Auto"
70+
ColumnDefinitions="18,*,Auto,Auto"
7171
DoubleTapped="OnDoubleTappedBranchNode">
7272

7373
<!-- Icon -->

src/Views/RevisionFileTreeView.axaml.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,18 @@ private void UpdateContent()
6868
switch (obj.Type)
6969
{
7070
case Models.ObjectType.Blob:
71-
CreateContent("Icons.File");
71+
CreateContent("Icons.File", new Thickness(0, 0, 0, 0));
7272
break;
7373
case Models.ObjectType.Commit:
74-
CreateContent("Icons.Submodule");
74+
CreateContent("Icons.Submodule", new Thickness(0, 0, 0, 0));
7575
break;
7676
default:
77-
CreateContent(node.IsExpanded ? "Icons.Folder.Open" : "Icons.Folder.Fill", Brushes.Goldenrod);
77+
CreateContent(node.IsExpanded ? "Icons.Folder.Open" : "Icons.Folder.Fill", new Thickness(0, 2, 0, 0), Brushes.Goldenrod);
7878
break;
7979
}
8080
}
8181

82-
private void CreateContent(string iconKey, IBrush fill = null)
82+
private void CreateContent(string iconKey, Thickness margin, IBrush fill = null)
8383
{
8484
var geo = this.FindResource(iconKey) as StreamGeometry;
8585
if (geo == null)
@@ -89,6 +89,7 @@ private void CreateContent(string iconKey, IBrush fill = null)
8989
{
9090
Width = 14,
9191
Height = 14,
92+
Margin = margin,
9293
HorizontalAlignment = HorizontalAlignment.Left,
9394
VerticalAlignment = VerticalAlignment.Center,
9495
Data = geo,

0 commit comments

Comments
 (0)