ux: change the primary button theme

This commit is contained in:
leo 2024-06-19 16:14:41 +08:00
parent dcc63e187b
commit 3dc32c87a8
No known key found for this signature in database
3 changed files with 6 additions and 13 deletions

View file

@ -111,8 +111,6 @@ This app supports open repository in external tools listed in the table below.
| Color.Border2 | Border color used in visual lines, like seperators, Rectange, etc. |
| Color.FlatButton.Background | Flat button background color, like `Cancel`, `Commit & Push` button |
| Color.FlatButton.BackgroundHovered | Flat button background color when hovered, like `Cancel` button |
| Color.FlatButton.PrimaryBackground | Primary flat button background color, like `Ok`, `Commit` button |
| Color.FlatButton.PrimaryBackgroundHovered | Primary flat button background color when hovered, like `Ok`, `Commit` button |
| Color.FG1 | Primary foreground color for all text elements |
| Color.FG2 | Secondary foreground color for all text elements |
| Color.Diff.EmptyBG | Background color used in empty lines in diff viewer |

View file

@ -405,7 +405,8 @@
</Style>
<Style Selector="Button.flat">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border2}"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
@ -419,8 +420,7 @@
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
Effect="drop-shadow(0 0 2 #80000000)"/>
CornerRadius="{TemplateBinding CornerRadius}"/>
<ContentPresenter x:Name="PART_ContentPresenter"
Margin="2"
@ -441,10 +441,11 @@
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style Selector="Button.flat.primary">
<Setter Property="Background" Value="{DynamicResource Brush.FlatButton.PrimaryBackground}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrush}"/>
<Setter Property="Background" Value="{DynamicResource AccentButtonBackground}"/>
</Style>
<Style Selector="Button.flat.primary:pointerover /template/ Border#PART_Border">
<Setter Property="Background" Value="{DynamicResource Brush.FlatButton.PrimaryBackgroundHovered}"/>
<Setter Property="Background" Value="{DynamicResource AccentButtonBackgroundPointerOver}"/>
</Style>
<Style Selector="Button.flat.primary:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="Transparent"/>

View file

@ -21,8 +21,6 @@
<Color x:Key="Color.Border2">#FFCFCFCF</Color>
<Color x:Key="Color.FlatButton.Background">#FFF8F8F8</Color>
<Color x:Key="Color.FlatButton.BackgroundHovered">White</Color>
<Color x:Key="Color.FlatButton.PrimaryBackground">#FF4295FF</Color>
<Color x:Key="Color.FlatButton.PrimaryBackgroundHovered">#FF529DFB</Color>
<Color x:Key="Color.FG1">#FF1F1F1F</Color>
<Color x:Key="Color.FG2">#FF6F6F6F</Color>
<Color x:Key="Color.Diff.EmptyBG">#3C000000</Color>
@ -52,8 +50,6 @@
<Color x:Key="Color.Border2">#FF404040</Color>
<Color x:Key="Color.FlatButton.Background">#FF303030</Color>
<Color x:Key="Color.FlatButton.BackgroundHovered">#FF333333</Color>
<Color x:Key="Color.FlatButton.PrimaryBackground">#FF3A3A3A</Color>
<Color x:Key="Color.FlatButton.PrimaryBackgroundHovered">#FF404040</Color>
<Color x:Key="Color.FG1">#FFDDDDDD</Color>
<Color x:Key="Color.FG2">#40F1F1F1</Color>
<Color x:Key="Color.Diff.EmptyBG">#3C000000</Color>
@ -83,8 +79,6 @@
<SolidColorBrush x:Key="Brush.Border2" Color="{DynamicResource Color.Border2}"/>
<SolidColorBrush x:Key="Brush.FlatButton.Background" Color="{DynamicResource Color.FlatButton.Background}"/>
<SolidColorBrush x:Key="Brush.FlatButton.BackgroundHovered" Color="{DynamicResource Color.FlatButton.BackgroundHovered}"/>
<SolidColorBrush x:Key="Brush.FlatButton.PrimaryBackground" Color="{DynamicResource Color.FlatButton.PrimaryBackground}"/>
<SolidColorBrush x:Key="Brush.FlatButton.PrimaryBackgroundHovered" Color="{DynamicResource Color.FlatButton.PrimaryBackgroundHovered}"/>
<SolidColorBrush x:Key="Brush.FG1" Color="{DynamicResource Color.FG1}"/>
<SolidColorBrush x:Key="Brush.FG2" Color="{DynamicResource Color.FG2}"/>
<SolidColorBrush x:Key="Brush.Accent" Color="{DynamicResource SystemAccentColor}"/>