From f0b6c4ecf9c584d05222da3f22c5a608aaaa55fa Mon Sep 17 00:00:00 2001 From: rabbitism Date: Fri, 27 Sep 2024 23:56:26 +0800 Subject: [PATCH] feat: try to implement Aqua. --- demo/Ursa.Demo/App.axaml | 4 +- demo/Ursa.Demo/Ursa.Demo.csproj | 8 ++ src/Ursa.Themes.Semi/Controls/Banner.axaml | 2 +- src/Ursa.Themes.Semi/Index.axaml | 7 +- src/Ursa.Themes.Semi/Index.axaml.cs | 5 + src/Ursa.Themes.Semi/Themes/Dark/Banner.axaml | 1 + .../Themes/HighContrast/Aquatic.axaml | 15 +++ .../Themes/HighContrast/Base.axaml | 102 ++++++++++++++++++ .../Themes/Light/Banner.axaml | 1 + 9 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 src/Ursa.Themes.Semi/Themes/HighContrast/Aquatic.axaml create mode 100644 src/Ursa.Themes.Semi/Themes/HighContrast/Base.axaml diff --git a/demo/Ursa.Demo/App.axaml b/demo/Ursa.Demo/App.axaml index 418891c..49bdfce 100644 --- a/demo/Ursa.Demo/App.axaml +++ b/demo/Ursa.Demo/App.axaml @@ -3,7 +3,9 @@ xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:u-semi="https://irihi.tech/ursa/themes/semi" - xmlns:semi="https://irihi.tech/semi"> + RequestedThemeVariant="{x:Static semi:SemiTheme.Aquatic}" + xmlns:semi="https://irihi.tech/semi" + xmlns:demo="clr-namespace:Ursa.Demo"> diff --git a/demo/Ursa.Demo/Ursa.Demo.csproj b/demo/Ursa.Demo/Ursa.Demo.csproj index 5e0a1c4..bf8cd04 100644 --- a/demo/Ursa.Demo/Ursa.Demo.csproj +++ b/demo/Ursa.Demo/Ursa.Demo.csproj @@ -19,7 +19,9 @@ + @@ -30,4 +32,10 @@ + + + + Assets\Semi.Avalonia.dll + + diff --git a/src/Ursa.Themes.Semi/Controls/Banner.axaml b/src/Ursa.Themes.Semi/Controls/Banner.axaml index 8624194..ff2767a 100644 --- a/src/Ursa.Themes.Semi/Controls/Banner.axaml +++ b/src/Ursa.Themes.Semi/Controls/Banner.axaml @@ -5,7 +5,7 @@ - + diff --git a/src/Ursa.Themes.Semi/Index.axaml b/src/Ursa.Themes.Semi/Index.axaml index f22145c..2f45fea 100644 --- a/src/Ursa.Themes.Semi/Index.axaml +++ b/src/Ursa.Themes.Semi/Index.axaml @@ -1,9 +1,14 @@ - + + + + + diff --git a/src/Ursa.Themes.Semi/Index.axaml.cs b/src/Ursa.Themes.Semi/Index.axaml.cs index 603e65a..6a61fe7 100644 --- a/src/Ursa.Themes.Semi/Index.axaml.cs +++ b/src/Ursa.Themes.Semi/Index.axaml.cs @@ -11,6 +11,11 @@ namespace Ursa.Themes.Semi; /// public class SemiTheme: Styles { + public static ThemeVariant Aquatic => new ThemeVariant(nameof(Aquatic), ThemeVariant.Dark); + public static ThemeVariant Desert => new ThemeVariant(nameof(Desert), ThemeVariant.Light); + public static ThemeVariant Dust => new ThemeVariant(nameof(Dust), ThemeVariant.Dark); + public static ThemeVariant NightSky => new ThemeVariant(nameof(NightSky), ThemeVariant.Dark); + private static readonly Lazy> _localeToResource = new Lazy>( () => new Dictionary { diff --git a/src/Ursa.Themes.Semi/Themes/Dark/Banner.axaml b/src/Ursa.Themes.Semi/Themes/Dark/Banner.axaml index 77feaa4..39f624e 100644 --- a/src/Ursa.Themes.Semi/Themes/Dark/Banner.axaml +++ b/src/Ursa.Themes.Semi/Themes/Dark/Banner.axaml @@ -10,4 +10,5 @@ + diff --git a/src/Ursa.Themes.Semi/Themes/HighContrast/Aquatic.axaml b/src/Ursa.Themes.Semi/Themes/HighContrast/Aquatic.axaml new file mode 100644 index 0000000..a388435 --- /dev/null +++ b/src/Ursa.Themes.Semi/Themes/HighContrast/Aquatic.axaml @@ -0,0 +1,15 @@ + + + #202020 + #FFFFFF + #75E9FC + #A6A6A6 + #263B50 + #8EE3F0 + #FFFFFF + #202020 + + + + diff --git a/src/Ursa.Themes.Semi/Themes/HighContrast/Base.axaml b/src/Ursa.Themes.Semi/Themes/HighContrast/Base.axaml new file mode 100644 index 0000000..62ea19a --- /dev/null +++ b/src/Ursa.Themes.Semi/Themes/HighContrast/Base.axaml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Ursa.Themes.Semi/Themes/Light/Banner.axaml b/src/Ursa.Themes.Semi/Themes/Light/Banner.axaml index e86efb3..f86be17 100644 --- a/src/Ursa.Themes.Semi/Themes/Light/Banner.axaml +++ b/src/Ursa.Themes.Semi/Themes/Light/Banner.axaml @@ -10,4 +10,5 @@ +