mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-05-20 07:16:32 +03:00
theme improvements
- force Light theme variant (temporary) to match the actual UI look - define some colors and brushes in AppTheme to avoid repetition - fix text color in AboutWindow
This commit is contained in:
@@ -15,7 +15,8 @@ public class AboutWindow : Window
|
|||||||
this.MinWidth = 450;
|
this.MinWidth = 450;
|
||||||
this.MinHeight = 250;
|
this.MinHeight = 250;
|
||||||
|
|
||||||
this.Background = new SolidColorBrush(Color.Parse("#2328c4"));
|
this.Background = this.FindResource("KeyKeeperAboutWindowBackgroundBrush") as IBrush;
|
||||||
|
this.Foreground = this.FindResource("KeyKeeperAboutWindowForegroundBrush") as IBrush;
|
||||||
|
|
||||||
var AboutKeyKeeper = new TextBlock
|
var AboutKeyKeeper = new TextBlock
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:Class="KeyKeeper.App"
|
x:Class="KeyKeeper.App"
|
||||||
xmlns:local="using:KeyKeeper"
|
xmlns:local="using:KeyKeeper"
|
||||||
RequestedThemeVariant="Default">
|
RequestedThemeVariant="Light">
|
||||||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||||
|
|
||||||
<Application.DataTemplates>
|
<Application.DataTemplates>
|
||||||
|
|||||||
@@ -8,6 +8,21 @@
|
|||||||
|
|
||||||
<StyleInclude Source="avares://Avalonia.Themes.Fluent/FluentTheme.xaml"/>
|
<StyleInclude Source="avares://Avalonia.Themes.Fluent/FluentTheme.xaml"/>
|
||||||
|
|
||||||
|
<Styles.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
|
<ResourceDictionary x:Key="Default">
|
||||||
|
<Color x:Key="KeyKeeperAccentColor">#FF2328C4</Color>
|
||||||
|
<Color x:Key="KeyKeeperForeground">#00000000</Color>
|
||||||
|
<Color x:Key="KeyKeeperBackground">#FFFFFFFF</Color>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="KeyKeeperAboutWindowBackgroundBrush" Color="{DynamicResource KeyKeeperAccentColor}" />
|
||||||
|
<SolidColorBrush x:Key="KeyKeeperAboutWindowForegroundBrush" Color="#FFFFFFFF" />
|
||||||
|
</ResourceDictionary>
|
||||||
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</Styles.Resources>
|
||||||
|
|
||||||
<Style Selector="Button:not(.dummy) /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="Button:not(.dummy) /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="#cccccc" />
|
<Setter Property="Background" Value="#cccccc" />
|
||||||
<Setter Property="Foreground" Value="#000000" />
|
<Setter Property="Foreground" Value="#000000" />
|
||||||
@@ -20,7 +35,6 @@
|
|||||||
<Setter Property="Background" Value="#444444" />
|
<Setter Property="Background" Value="#444444" />
|
||||||
<Setter Property="Foreground" Value="#ffffff" />
|
<Setter Property="Foreground" Value="#ffffff" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="Button.accentSidebarButton /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="Button.accentSidebarButton /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Background" Value="#00000000" />
|
<Setter Property="Background" Value="#00000000" />
|
||||||
<Setter Property="Foreground" Value="white" />
|
<Setter Property="Foreground" Value="white" />
|
||||||
@@ -33,6 +47,6 @@
|
|||||||
<Setter Property="CornerRadius" Value="9" />
|
<Setter Property="CornerRadius" Value="9" />
|
||||||
<Setter Property="BorderBrush" Value="white" />
|
<Setter Property="BorderBrush" Value="white" />
|
||||||
<Setter Property="Background" Value="white"/>
|
<Setter Property="Background" Value="white"/>
|
||||||
<Setter Property="Foreground" Value="#2328C4"/>
|
<Setter Property="Foreground" Value="{DynamicResource KeyKeeperAccentColor}"/>
|
||||||
</Style>
|
</Style>
|
||||||
</Styles>
|
</Styles>
|
||||||
Reference in New Issue
Block a user