feature: add new color key Color.DecoratorFG to customize foreground color of commit refs (#225)

This commit is contained in:
leo 2024-07-01 20:27:59 +08:00
parent fb5a7111c6
commit 366e467578
No known key found for this signature in database
4 changed files with 6 additions and 2 deletions

View file

@ -114,6 +114,7 @@ This app supports open repository in external tools listed in the table below.
| Color.DecoratorIcon | Foreground color for commit ref icon |
| Color.DecoratorBranch | Background color for commit branch ref name |
| Color.DecoratorTag | Background color for commit tag ref name |
| Color.DecoratorFG | Foreground color for commit tag ref name |
| Color.Border0 | Border color used in some controls, like Window, Tab, Toolbar, etc. |
| Color.Border1 | Border color used in inputs, like TextBox, ComboBox, etc. |
| Color.Border2 | Border color used in visual lines, like seperators, Rectange, etc. |

View file

@ -17,6 +17,7 @@
<Color x:Key="Color.DecoratorIcon">#FFF8F8F8</Color>
<Color x:Key="Color.DecoratorBranch">#FFFFB835</Color>
<Color x:Key="Color.DecoratorTag">#FF02C302</Color>
<Color x:Key="Color.DecoratorFG">Black</Color>
<Color x:Key="Color.Conflict">#FF836C2E</Color>
<Color x:Key="Color.ConflictForeground">#FFFFFFFF</Color>
<Color x:Key="Color.Border0">#FFCFCFCF</Color>
@ -49,6 +50,7 @@
<Color x:Key="Color.DecoratorIcon">#FFF8F8F8</Color>
<Color x:Key="Color.DecoratorBranch">#FFFFB835</Color>
<Color x:Key="Color.DecoratorTag">#FF02C302</Color>
<Color x:Key="Color.DecoratorFG">Black</Color>
<Color x:Key="Color.Conflict">#FFFAFAD2</Color>
<Color x:Key="Color.ConflictForeground">#FF252525</Color>
<Color x:Key="Color.Border0">#FF181818</Color>
@ -81,6 +83,7 @@
<SolidColorBrush x:Key="Brush.DecoratorIcon" Color="{DynamicResource Color.DecoratorIcon}"/>
<SolidColorBrush x:Key="Brush.DecoratorBranch" Color="{DynamicResource Color.DecoratorBranch}"/>
<SolidColorBrush x:Key="Brush.DecoratorTag" Color="{DynamicResource Color.DecoratorTag}"/>
<SolidColorBrush x:Key="Brush.DecoratorFG" Color="{DynamicResource Color.DecoratorFG}"/>
<SolidColorBrush x:Key="Brush.Conflict" Color="{DynamicResource Color.Conflict}"/>
<SolidColorBrush x:Key="Brush.ConflictForeground" Color="{DynamicResource Color.ConflictForeground}"/>
<SolidColorBrush x:Key="Brush.Border0" Color="{DynamicResource Color.Border0}"/>

View file

@ -94,7 +94,7 @@
<Path Width="8" Height="8" Data="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToIcon}}" Fill="{DynamicResource Brush.DecoratorIcon}"/>
</Border>
<Border Background="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToBackground}}">
<TextBlock Classes="monospace" Text="{Binding Name}" FontSize="10" Margin="4,0" Foreground="Black"/>
<TextBlock Classes="monospace" Text="{Binding Name}" FontSize="10" Margin="4,0" Foreground="{DynamicResource Brush.DecoratorFG}"/>
</Border>
</StackPanel>
</Border>

View file

@ -58,7 +58,7 @@
Text="{Binding Name}"
FontSize="10"
Margin="4,0"
Foreground="Black"
Foreground="{DynamicResource Brush.DecoratorFG}"
FontWeight="{Binding Type, Converter={x:Static c:DecoratorTypeConverters.ToFontWeight}}"/>
</Border>
</StackPanel>