mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
ux: tree folder icon margin
This commit is contained in:
parent
a807aa9e12
commit
24ca3eaf8c
2 changed files with 6 additions and 5 deletions
|
@ -67,7 +67,7 @@
|
|||
<!-- Content Area (allows double-click) -->
|
||||
<Grid Grid.Column="1"
|
||||
Background="Transparent"
|
||||
ColumnDefinitions="20,*,Auto,Auto"
|
||||
ColumnDefinitions="18,*,Auto,Auto"
|
||||
DoubleTapped="OnDoubleTappedBranchNode">
|
||||
|
||||
<!-- Icon -->
|
||||
|
|
|
@ -68,18 +68,18 @@ namespace SourceGit.Views
|
|||
switch (obj.Type)
|
||||
{
|
||||
case Models.ObjectType.Blob:
|
||||
CreateContent("Icons.File");
|
||||
CreateContent("Icons.File", new Thickness(0, 0, 0, 0));
|
||||
break;
|
||||
case Models.ObjectType.Commit:
|
||||
CreateContent("Icons.Submodule");
|
||||
CreateContent("Icons.Submodule", new Thickness(0, 0, 0, 0));
|
||||
break;
|
||||
default:
|
||||
CreateContent(node.IsExpanded ? "Icons.Folder.Open" : "Icons.Folder.Fill", Brushes.Goldenrod);
|
||||
CreateContent(node.IsExpanded ? "Icons.Folder.Open" : "Icons.Folder.Fill", new Thickness(0, 2, 0, 0), Brushes.Goldenrod);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateContent(string iconKey, IBrush fill = null)
|
||||
private void CreateContent(string iconKey, Thickness margin, IBrush fill = null)
|
||||
{
|
||||
var geo = this.FindResource(iconKey) as StreamGeometry;
|
||||
if (geo == null)
|
||||
|
@ -89,6 +89,7 @@ namespace SourceGit.Views
|
|||
{
|
||||
Width = 14,
|
||||
Height = 14,
|
||||
Margin = margin,
|
||||
HorizontalAlignment = HorizontalAlignment.Left,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
Data = geo,
|
||||
|
|
Loading…
Reference in a new issue