From 646f56d60acf1cfc2842b2f9c494737763f3d9e9 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Thu, 19 Sep 2024 23:28:57 +0800 Subject: [PATCH] feat: initialize aquatic theme. --- demo/Semi.Avalonia.Demo/App.axaml | 1 + .../Themes/Aquatic/Aquatic.axaml | 107 ++++++++++++++++++ src/Semi.Avalonia/Themes/SemiTheme.axaml | 4 +- src/Semi.Avalonia/Themes/SemiTheme.axaml.cs | 2 + 4 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 src/Semi.Avalonia/Themes/Aquatic/Aquatic.axaml diff --git a/demo/Semi.Avalonia.Demo/App.axaml b/demo/Semi.Avalonia.Demo/App.axaml index 1e0383a..0beecc9 100644 --- a/demo/Semi.Avalonia.Demo/App.axaml +++ b/demo/Semi.Avalonia.Demo/App.axaml @@ -2,6 +2,7 @@ x:Class="Semi.Avalonia.Demo.App" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + RequestedThemeVariant="{x:Static semi:SemiTheme.Aquatic}" xmlns:semi="https://irihi.tech/semi"> diff --git a/src/Semi.Avalonia/Themes/Aquatic/Aquatic.axaml b/src/Semi.Avalonia/Themes/Aquatic/Aquatic.axaml new file mode 100644 index 0000000..56ffd32 --- /dev/null +++ b/src/Semi.Avalonia/Themes/Aquatic/Aquatic.axaml @@ -0,0 +1,107 @@ + + + #202020 + #FFFFFF + #75E9FC + #A6A6A6 + #263B50 + #8EE3F0 + #202020 + #FFFFFF + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Semi.Avalonia/Themes/SemiTheme.axaml b/src/Semi.Avalonia/Themes/SemiTheme.axaml index 52c207f..b5f679c 100644 --- a/src/Semi.Avalonia/Themes/SemiTheme.axaml +++ b/src/Semi.Avalonia/Themes/SemiTheme.axaml @@ -1,9 +1,11 @@ - + + diff --git a/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs b/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs index 23144a0..f0103a0 100644 --- a/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs +++ b/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs @@ -10,6 +10,8 @@ namespace Semi.Avalonia; public class SemiTheme : Styles { + public static ThemeVariant Aquatic => new ThemeVariant(nameof(Aquatic), ThemeVariant.Dark); + private static readonly Dictionary _localeToResource = new() { { new CultureInfo("zh-cn"), new zh_cn() },