Skip to content

Commit 4fa3885

Browse files
committed
ux: add a new color Color.BadgeFG for text in badge
1 parent fa36656 commit 4fa3885

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ This app supports open repository in external tools listed in the table below.
107107
| Color.Popup | Popup panel background color |
108108
| Color.Contents | Background color used in inputs, data grids, file content viewer, change lists, text diff viewer, etc. |
109109
| Color.Badge | Badge background color |
110+
| Color.BadgeFG | Badge foreground color |
110111
| Color.Conflict | Conflict panel background color |
111112
| Color.ConflictForeground | Conflict panel foreground color |
112113
| Color.Border0 | Border color used in some controls, like Window, Tab, Toolbar, etc. |

src/Resources/Themes.axaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<Color x:Key="Color.Popup">#FFF8F8F8</Color>
1313
<Color x:Key="Color.Contents">#FFFAFAFA</Color>
1414
<Color x:Key="Color.Badge">#FFB0CEE8</Color>
15+
<Color x:Key="Color.BadgeFG">#FF1F1F1F</Color>
1516
<Color x:Key="Color.Decorator">#FF6F6F6F</Color>
1617
<Color x:Key="Color.DecoratorIcon">#FFF8F8F8</Color>
1718
<Color x:Key="Color.Conflict">#FF836C2E</Color>
@@ -41,6 +42,7 @@
4142
<Color x:Key="Color.Popup">#FF2B2B2B</Color>
4243
<Color x:Key="Color.Contents">#FF1B1B1B</Color>
4344
<Color x:Key="Color.Badge">#FF8F8F8F</Color>
45+
<Color x:Key="Color.BadgeFG">#FFDDDDDD</Color>
4446
<Color x:Key="Color.Decorator">#FF505050</Color>
4547
<Color x:Key="Color.DecoratorIcon">#FFF8F8F8</Color>
4648
<Color x:Key="Color.Conflict">#FFFAFAD2</Color>
@@ -70,6 +72,7 @@
7072
<SolidColorBrush x:Key="Brush.Popup" Color="{DynamicResource Color.Popup}"/>
7173
<SolidColorBrush x:Key="Brush.Contents" Color="{DynamicResource Color.Contents}"/>
7274
<SolidColorBrush x:Key="Brush.Badge" Color="{DynamicResource Color.Badge}"/>
75+
<SolidColorBrush x:Key="Brush.BadgeFG" Color="{DynamicResource Color.BadgeFG}"/>
7376
<SolidColorBrush x:Key="Brush.Decorator" Color="{DynamicResource Color.Decorator}"/>
7477
<SolidColorBrush x:Key="Brush.DecoratorIcon" Color="{DynamicResource Color.DecoratorIcon}"/>
7578
<SolidColorBrush x:Key="Brush.Conflict" Color="{DynamicResource Color.Conflict}"/>

src/Views/DiffView.axaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
Background="{DynamicResource Brush.Badge}"
2727
IsVisible="{Binding FileModeChange, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
2828
ToolTip.Tip="{DynamicResource Text.Diff.FileModeChanged}">
29-
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="4,0" Text="{Binding FileModeChange}"/>
29+
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="4,0" Text="{Binding FileModeChange}" Foreground="{DynamicResource Brush.BadgeFG}"/>
3030
</Border>
3131

3232
<!-- Title -->
@@ -110,7 +110,7 @@
110110
<Path Width="64" Height="64" Data="{StaticResource Icons.Binary}" Fill="{DynamicResource Brush.FG2}"/>
111111
<Grid Margin="0,16,0,0" HorizontalAlignment="Center" RowDefinitions="32,32" ColumnDefinitions="Auto,Auto,Auto">
112112
<Border Grid.Row="0" Grid.Column="0" Height="16" Background="{DynamicResource Brush.Badge}" CornerRadius="8" VerticalAlignment="Center">
113-
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10"/>
113+
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10" Foreground="{DynamicResource Brush.BadgeFG}"/>
114114
</Border>
115115

116116
<TextBlock Grid.Row="0" Grid.Column="1" Classes="monospace" Text="{Binding OldSize}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="16" Margin="8,0"/>
@@ -137,7 +137,7 @@
137137
<Path Width="64" Height="64" Data="{StaticResource Icons.LFS}" Fill="{DynamicResource Brush.FG2}"/>
138138
<Grid Margin="0,16,0,0" HorizontalAlignment="Center" RowDefinitions="32,32" ColumnDefinitions="Auto,Auto,Auto">
139139
<Border Grid.Row="0" Grid.Column="0" Height="16" Background="{DynamicResource Brush.Badge}" CornerRadius="8" VerticalAlignment="Center">
140-
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10"/>
140+
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10" Foreground="{DynamicResource Brush.BadgeFG}"/>
141141
</Border>
142142

143143
<TextBlock Grid.Row="0" Grid.Column="1" Classes="monospace" Text="{Binding Old.Size}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Right" FontSize="16" Margin="8,0"/>

src/Views/ImageDiffView.axaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<Grid RowDefinitions="Auto,*" Margin="16,0" IsVisible="{Binding Old, Converter={x:Static ObjectConverters.IsNotNull}}">
2626
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center">
2727
<Border Height="16" Background="{DynamicResource Brush.Badge}" CornerRadius="8" VerticalAlignment="Center">
28-
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10"/>
28+
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10" Foreground="{DynamicResource Brush.BadgeFG}"/>
2929
</Border>
3030

3131
<TextBlock Classes="monospace" Text="{Binding OldImageSize}" Margin="8,0,0,0"/>
@@ -78,7 +78,7 @@
7878
<Grid RowDefinitions="Auto,*" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="8,16">
7979
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto" HorizontalAlignment="Center">
8080
<Border Grid.Column="0" Height="16" Background="{DynamicResource Brush.Badge}" CornerRadius="8" VerticalAlignment="Center">
81-
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10"/>
81+
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10" Foreground="{DynamicResource Brush.BadgeFG}"/>
8282
</Border>
8383

8484
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding OldImageSize}" Margin="8,0,0,0"/>
@@ -114,7 +114,7 @@
114114
<Grid RowDefinitions="Auto,*,Auto" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="8,16,8,0">
115115
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto" HorizontalAlignment="Center">
116116
<Border Grid.Column="0" Height="16" Background="{DynamicResource Brush.Badge}" CornerRadius="8" VerticalAlignment="Center">
117-
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10"/>
117+
<TextBlock Classes="monospace" Text="{DynamicResource Text.Diff.Binary.Old}" Margin="8,0" FontSize="10" Foreground="{DynamicResource Brush.BadgeFG}"/>
118118
</Border>
119119

120120
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding OldImageSize}" Margin="8,0,0,0"/>

src/Views/Repository.axaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
VerticalAlignment="Center"
176176
Background="{DynamicResource Brush.Badge}"
177177
IsVisible="{Binding WorkingCopyChangesCount, Converter={x:Static c:IntConverters.IsGreaterThanZero}}">
178-
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding WorkingCopyChangesCount}"/>
178+
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding WorkingCopyChangesCount}" Foreground="{DynamicResource Brush.BadgeFG}"/>
179179
</Border>
180180
</Grid>
181181
</ListBoxItem>
@@ -191,7 +191,7 @@
191191
VerticalAlignment="Center"
192192
Background="{DynamicResource Brush.Badge}"
193193
IsVisible="{Binding StashesCount, Converter={x:Static c:IntConverters.IsGreaterThanZero}}">
194-
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding StashesCount}"/>
194+
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding StashesCount}" Foreground="{DynamicResource Brush.BadgeFG}"/>
195195
</Border>
196196
</Grid>
197197
</ListBoxItem>
@@ -284,7 +284,7 @@
284284
<TextBlock Grid.Column="1" Text="{Binding Name}" Classes="monospace" FontWeight="{Binding IsCurrent, Converter={x:Static c:BoolConverters.BoldIfTrue}}"/>
285285

286286
<Border Grid.Column="2" Margin="8,0" Height="18" CornerRadius="9" VerticalAlignment="Center" Background="{DynamicResource Brush.Badge}" IsVisible="{Binding IsUpstreamTrackStatusVisible}">
287-
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding UpstreamTrackStatus}"/>
287+
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding UpstreamTrackStatus}" Foreground="{DynamicResource Brush.BadgeFG}"/>
288288
</Border>
289289

290290
<ToggleButton Grid.Column="3"

0 commit comments

Comments
 (0)