File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
22using System . IO ;
3+ using Avalonia . Media ;
34
45namespace SourceGit . Models
56{
@@ -10,6 +11,7 @@ public class GitIgnoreFile
1011 public bool IsShared { get ; set ; }
1112 public string File => IsShared ? ".gitignore" : "<git_dir>/info/exclude" ;
1213 public string Desc => IsShared ? "Shared" : "Private" ;
14+ public IBrush Brush => IsShared ? Brushes . Green : Brushes . Gray ;
1315
1416 public GitIgnoreFile ( bool isShared )
1517 {
Original file line number Diff line number Diff line change 3838 SelectedItem =" {Binding StorageFile, Mode=TwoWay}" >
3939 <ComboBox .ItemTemplate>
4040 <DataTemplate DataType =" m:GitIgnoreFile" >
41- <Grid ColumnDefinitions =" 20,*" >
41+ <Grid ColumnDefinitions =" 20,*,Auto " >
4242 <Path Grid.Column=" 0"
4343 Width =" 12" Height =" 12"
4444 Data =" {StaticResource Icons.File}"
4545 Fill =" {DynamicResource Brush.FG2}" />
4646
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 >
5252 </Grid >
5353 </DataTemplate >
5454 </ComboBox .ItemTemplate>
You can’t perform that action at this time.
0 commit comments