File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
using System . Collections . Generic ;
2
2
using System . IO ;
3
+ using Avalonia . Media ;
3
4
4
5
namespace SourceGit . Models
5
6
{
@@ -10,6 +11,7 @@ public class GitIgnoreFile
10
11
public bool IsShared { get ; set ; }
11
12
public string File => IsShared ? ".gitignore" : "<git_dir>/info/exclude" ;
12
13
public string Desc => IsShared ? "Shared" : "Private" ;
14
+ public IBrush Brush => IsShared ? Brushes . Green : Brushes . Gray ;
13
15
14
16
public GitIgnoreFile ( bool isShared )
15
17
{
Original file line number Diff line number Diff line change 38
38
SelectedItem =" {Binding StorageFile, Mode=TwoWay}" >
39
39
<ComboBox .ItemTemplate>
40
40
<DataTemplate DataType =" m:GitIgnoreFile" >
41
- <Grid ColumnDefinitions =" 20,*" >
41
+ <Grid ColumnDefinitions =" 20,*,Auto " >
42
42
<Path Grid.Column=" 0"
43
43
Width =" 12" Height =" 12"
44
44
Data =" {StaticResource Icons.File}"
45
45
Fill =" {DynamicResource Brush.FG2}" />
46
46
47
- <TextBlock Grid.Column=" 1" VerticalAlignment =" Center" >
48
- < Run Text = " {Binding File, Mode=OneWay} " />
49
- < Run Text = " • " Foreground = " {DynamicResource Brush.FG2} " / >
50
- <Run Text =" {Binding Desc, Mode=OneWay} " Foreground =" {DynamicResource Brush.FG2} " />
51
- </TextBlock >
47
+ <TextBlock Grid.Column=" 1" Text = " {Binding File, Mode=OneWay} " VerticalAlignment =" Center" / >
48
+
49
+ < Border Grid.Column= " 2 " Height = " 16 " Background = " {Binding Brush} " CornerRadius = " 8 " VerticalAlignment = " Center " >
50
+ <TextBlock Classes = " primary " Text =" {Binding Desc} " Margin = " 8,0 " FontSize = " 10 " Foreground =" White " />
51
+ </Border >
52
52
</Grid >
53
53
</DataTemplate >
54
54
</ComboBox .ItemTemplate>
You can’t perform that action at this time.
0 commit comments