From caae00b7c08dc2442fd1ef79064ee6c9689013e8 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Sat, 4 Feb 2023 11:49:22 +0800 Subject: [PATCH] feat: add RefreshContainer and ThemeVariantScope. --- .../Pages/RefreshContainerDemo.axaml | 18 ++++++++ .../Pages/RefreshContainerDemo.axaml.cs | 14 ++++++ .../Pages/ThemeVariantDemo.axaml | 13 ++++++ .../Pages/ThemeVariantDemo.axaml.cs | 13 ++++++ demo/Semi.Avalonia.Demo/Views/MainView.axaml | 6 +++ src/Semi.Avalonia/Controls/Controls.axaml | 2 + .../Controls/RefreshContainer.axaml | 45 +++++++++++++++++++ .../Controls/ThemeVariantScope.axaml | 6 +++ src/Semi.Avalonia/Themes/Dark/Dark.axaml | 1 + .../Themes/Dark/RefreshContainer.axaml | 7 +++ src/Semi.Avalonia/Themes/Light/Light.axaml | 1 + .../Themes/Light/RefreshContainer.axaml | 7 +++ 12 files changed, 133 insertions(+) create mode 100644 demo/Semi.Avalonia.Demo/Pages/RefreshContainerDemo.axaml create mode 100644 demo/Semi.Avalonia.Demo/Pages/RefreshContainerDemo.axaml.cs create mode 100644 demo/Semi.Avalonia.Demo/Pages/ThemeVariantDemo.axaml create mode 100644 demo/Semi.Avalonia.Demo/Pages/ThemeVariantDemo.axaml.cs create mode 100644 src/Semi.Avalonia/Controls/RefreshContainer.axaml create mode 100644 src/Semi.Avalonia/Controls/ThemeVariantScope.axaml create mode 100644 src/Semi.Avalonia/Themes/Dark/RefreshContainer.axaml create mode 100644 src/Semi.Avalonia/Themes/Light/RefreshContainer.axaml diff --git a/demo/Semi.Avalonia.Demo/Pages/RefreshContainerDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/RefreshContainerDemo.axaml new file mode 100644 index 0000000..0f49d4d --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Pages/RefreshContainerDemo.axaml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/demo/Semi.Avalonia.Demo/Pages/RefreshContainerDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/RefreshContainerDemo.axaml.cs new file mode 100644 index 0000000..0add79b --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Pages/RefreshContainerDemo.axaml.cs @@ -0,0 +1,14 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; + +namespace Semi.Avalonia.Demo.Pages; + +public partial class RefreshContainerDemo : UserControl +{ + public RefreshContainerDemo() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Pages/ThemeVariantDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ThemeVariantDemo.axaml new file mode 100644 index 0000000..77f5d88 --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Pages/ThemeVariantDemo.axaml @@ -0,0 +1,13 @@ + + + + + diff --git a/demo/Semi.Avalonia.Demo/Pages/ThemeVariantDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ThemeVariantDemo.axaml.cs new file mode 100644 index 0000000..7a177ae --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Pages/ThemeVariantDemo.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Semi.Avalonia.Demo.Pages; + +public partial class ThemeVariantDemo : UserControl +{ + public ThemeVariantDemo() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Views/MainView.axaml b/demo/Semi.Avalonia.Demo/Views/MainView.axaml index 8a1abd7..0940605 100644 --- a/demo/Semi.Avalonia.Demo/Views/MainView.axaml +++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml @@ -78,6 +78,9 @@ + + + @@ -96,6 +99,9 @@ + + + diff --git a/src/Semi.Avalonia/Controls/Controls.axaml b/src/Semi.Avalonia/Controls/Controls.axaml index 8b4b895..7da7f8d 100644 --- a/src/Semi.Avalonia/Controls/Controls.axaml +++ b/src/Semi.Avalonia/Controls/Controls.axaml @@ -31,6 +31,7 @@ + @@ -42,6 +43,7 @@ + diff --git a/src/Semi.Avalonia/Controls/RefreshContainer.axaml b/src/Semi.Avalonia/Controls/RefreshContainer.axaml new file mode 100644 index 0000000..e922b31 --- /dev/null +++ b/src/Semi.Avalonia/Controls/RefreshContainer.axaml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Semi.Avalonia/Controls/ThemeVariantScope.axaml b/src/Semi.Avalonia/Controls/ThemeVariantScope.axaml new file mode 100644 index 0000000..8540fc0 --- /dev/null +++ b/src/Semi.Avalonia/Controls/ThemeVariantScope.axaml @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/Semi.Avalonia/Themes/Dark/Dark.axaml b/src/Semi.Avalonia/Themes/Dark/Dark.axaml index d108546..458b0f5 100644 --- a/src/Semi.Avalonia/Themes/Dark/Dark.axaml +++ b/src/Semi.Avalonia/Themes/Dark/Dark.axaml @@ -25,6 +25,7 @@ + diff --git a/src/Semi.Avalonia/Themes/Dark/RefreshContainer.axaml b/src/Semi.Avalonia/Themes/Dark/RefreshContainer.axaml new file mode 100644 index 0000000..7f21a12 --- /dev/null +++ b/src/Semi.Avalonia/Themes/Dark/RefreshContainer.axaml @@ -0,0 +1,7 @@ + + + + + 24 + M14.2 3.78966C9.66551 2.57466 5.00465 5.26561 3.78964 9.80007C3.12066 12.2967 3.63433 14.8301 4.99177 16.8102C5.46019 17.4935 5.28601 18.4271 4.60273 18.8955C3.91945 19.364 2.98581 19.1898 2.51739 18.5065C0.685557 15.8344 -0.0134454 12.4023 0.891867 9.02361C2.5357 2.88875 8.84157 -0.751945 14.9764 0.891885C21.1113 2.53572 24.752 8.84159 23.1082 14.9765C22.8937 15.7767 22.0712 16.2515 21.271 16.0371C20.4708 15.8227 19.996 15.0002 20.2104 14.2C21.4254 9.66553 18.7344 5.00467 14.2 3.78966Z + diff --git a/src/Semi.Avalonia/Themes/Light/Light.axaml b/src/Semi.Avalonia/Themes/Light/Light.axaml index f0e2aa7..22a620e 100644 --- a/src/Semi.Avalonia/Themes/Light/Light.axaml +++ b/src/Semi.Avalonia/Themes/Light/Light.axaml @@ -24,6 +24,7 @@ + diff --git a/src/Semi.Avalonia/Themes/Light/RefreshContainer.axaml b/src/Semi.Avalonia/Themes/Light/RefreshContainer.axaml new file mode 100644 index 0000000..d39c60f --- /dev/null +++ b/src/Semi.Avalonia/Themes/Light/RefreshContainer.axaml @@ -0,0 +1,7 @@ + + + + + 24 + M14.2 3.78966C9.66551 2.57466 5.00465 5.26561 3.78964 9.80007C3.12066 12.2967 3.63433 14.8301 4.99177 16.8102C5.46019 17.4935 5.28601 18.4271 4.60273 18.8955C3.91945 19.364 2.98581 19.1898 2.51739 18.5065C0.685557 15.8344 -0.0134454 12.4023 0.891867 9.02361C2.5357 2.88875 8.84157 -0.751945 14.9764 0.891885C21.1113 2.53572 24.752 8.84159 23.1082 14.9765C22.8937 15.7767 22.0712 16.2515 21.271 16.0371C20.4708 15.8227 19.996 15.0002 20.2104 14.2C21.4254 9.66553 18.7344 5.00467 14.2 3.78966Z +