@@ -50,25 +50,27 @@ private void UpdateContent()
50
50
51
51
if ( node . Backend is Models . Remote )
52
52
{
53
- CreateContent ( new Thickness ( 0 , 0 , 0 , 0 ) , "Icons.Remote" , false ) ;
53
+ CreateContent ( new Thickness ( 0 , 0 , 0 , 0 ) , "Icons.Remote" ) ;
54
54
}
55
55
else if ( node . Backend is Models . Branch branch )
56
56
{
57
57
if ( branch . IsCurrent )
58
- CreateContent ( new Thickness ( 0 , 0 , 0 , 0 ) , "Icons.CheckCircled" , true ) ;
58
+ CreateContent ( new Thickness ( 0 , 0 , 0 , 0 ) , "Icons.CheckCircled" , Brushes . Green ) ;
59
+ else if ( branch . IsLocal && ! string . IsNullOrEmpty ( branch . WorktreePath ) )
60
+ CreateContent ( new Thickness ( 2 , 0 , 0 , 0 ) , "Icons.Branch" , Brushes . Cyan ) ;
59
61
else
60
- CreateContent ( new Thickness ( 2 , 0 , 0 , 0 ) , "Icons.Branch" , false ) ;
62
+ CreateContent ( new Thickness ( 2 , 0 , 0 , 0 ) , "Icons.Branch" ) ;
61
63
}
62
64
else
63
65
{
64
66
if ( node . IsExpanded )
65
- CreateContent ( new Thickness ( 0 , 2 , 0 , 0 ) , "Icons.Folder.Open" , false ) ;
67
+ CreateContent ( new Thickness ( 0 , 2 , 0 , 0 ) , "Icons.Folder.Open" ) ;
66
68
else
67
- CreateContent ( new Thickness ( 0 , 2 , 0 , 0 ) , "Icons.Folder" , false ) ;
69
+ CreateContent ( new Thickness ( 0 , 2 , 0 , 0 ) , "Icons.Folder" ) ;
68
70
}
69
71
}
70
72
71
- private void CreateContent ( Thickness margin , string iconKey , bool highlight )
73
+ private void CreateContent ( Thickness margin , string iconKey , IBrush fill = null )
72
74
{
73
75
if ( this . FindResource ( iconKey ) is not StreamGeometry geo )
74
76
return ;
@@ -83,8 +85,8 @@ private void CreateContent(Thickness margin, string iconKey, bool highlight)
83
85
Data = geo ,
84
86
} ;
85
87
86
- if ( highlight )
87
- path . Fill = Brushes . Green ;
88
+ if ( fill != null )
89
+ path . Fill = fill ;
88
90
89
91
Content = path ;
90
92
}
0 commit comments