From 9e0dc4220024d20ab881369823e43b9566c8f625 Mon Sep 17 00:00:00 2001 From: yuzh <46953451+yuzh0816@users.noreply.github.com> Date: Tue, 8 Oct 2024 23:34:58 +0800 Subject: [PATCH 01/10] Modify docs to improve readability. --- docs/docs/documentation/faq/custom-font.md | 12 ++++-------- docs/docs/zh/documentation/faq/custom-font.md | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/docs/docs/documentation/faq/custom-font.md b/docs/docs/documentation/faq/custom-font.md index 7b8f650fd..4d379e682 100644 --- a/docs/docs/documentation/faq/custom-font.md +++ b/docs/docs/documentation/faq/custom-font.md @@ -1,6 +1,6 @@ # How to use Custom Font -Here is the `App.axaml` after creating the SukiUI project: +Here is the `App.axaml` after creating your SukiUI project: ```xml ``` -Assuming that there exists a font file `Assets/MiSans-Bold.ttf` and set the build action of that to `AvaloniaResource` +Assuming that there exists a font file `Assets/FontName-xxx.ttf` and set the build action of that to `AvaloniaResource` Then replace the `DefaultFontFamily` with your font: @@ -37,7 +37,7 @@ Then replace the `DefaultFontFamily` with your font: // [!code highlight] // [!code highlight] - avares://SukiTest/Assets/MiSans-Bold.ttf#MiSans // [!code highlight] + avares://YourProject/Assets#FontName // [!code highlight] // [!code highlight] // [!code highlight] @@ -49,8 +49,4 @@ Then replace the `DefaultFontFamily` with your font: -``` - -::: tip -`#MiSans` is not the same in other font files, you can use a program like `Windows Font Viewer` to see the font name -::: \ No newline at end of file +``` \ No newline at end of file diff --git a/docs/docs/zh/documentation/faq/custom-font.md b/docs/docs/zh/documentation/faq/custom-font.md index c97f9d36a..8f29fee0b 100644 --- a/docs/docs/zh/documentation/faq/custom-font.md +++ b/docs/docs/zh/documentation/faq/custom-font.md @@ -1,6 +1,6 @@ # 如何使用自定义字体 -以下是创建一个新的 SukiUI 项目后的 `App.axaml` 文件: +以下是创建一个新的基于 SukiUI 项目后的 `App.axaml` 文件: ```xml ``` -假设存在一个字体文件 `Assets/MiSans-Bold.ttf`,并将其构建行为设置为 `AvaloniaResource` +假设存在一组字体文件 `Assets/FontName-xxx.ttf`,并将其构建行为设置为 `AvaloniaResource` 然后替换 `DefaultFontFamily` 为你的字体: @@ -37,7 +37,7 @@ // [!code highlight] // [!code highlight] - avares://SukiTest/Assets/MiSans-Bold.ttf#MiSans // [!code highlight] + avares://YourProject/Assets#FontName // [!code highlight] // [!code highlight] // [!code highlight] @@ -49,8 +49,4 @@ -``` - -::: tip -`#MiSans` 在其他字体中的名称都不一样,你可以使用类似 `Windows 字体查看器` 等软件查看字体名称 -::: \ No newline at end of file +``` \ No newline at end of file From 26ecd9ea108c8dbf781048f33128dd94b5e3fca8 Mon Sep 17 00:00:00 2001 From: AuroraZiling Date: Wed, 9 Oct 2024 10:25:09 +0800 Subject: [PATCH 02/10] docs: Radiobutton --- .../controls/inputs/radiobutton.md | 7 ------ .../controls/inputs/radiobutton.md | 22 +++++++++++++++---- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/docs/docs/documentation/controls/inputs/radiobutton.md b/docs/docs/documentation/controls/inputs/radiobutton.md index 647bdf29b..f1afd09a6 100644 --- a/docs/docs/documentation/controls/inputs/radiobutton.md +++ b/docs/docs/documentation/controls/inputs/radiobutton.md @@ -6,8 +6,6 @@ A control used for collecting the user's choice. ![{3562E3E6-C5A7-4D5C-BB1A-BF95347A6AA3}](https://github.com/user-attachments/assets/3157a435-10dd-4d84-ac91-e83739023ee9) - - ```xml ``` @@ -28,9 +24,6 @@ A control used for collecting the user's choice. ![{466C440E-25EE-4CF1-985F-EC8105043D22}](https://github.com/user-attachments/assets/aea0e668-c02c-432c-9f3f-e8621e726444) - - - ```xml ``` diff --git a/docs/docs/zh/documentation/controls/inputs/radiobutton.md b/docs/docs/zh/documentation/controls/inputs/radiobutton.md index 2fa46a8d3..d97b223e4 100644 --- a/docs/docs/zh/documentation/controls/inputs/radiobutton.md +++ b/docs/docs/zh/documentation/controls/inputs/radiobutton.md @@ -2,11 +2,9 @@ 收集用户单项选择的控件 -## 展示 +## Base - - -## 示例 +![{3562E3E6-C5A7-4D5C-BB1A-BF95347A6AA3}](https://github.com/user-attachments/assets/3157a435-10dd-4d84-ac91-e83739023ee9) ```xml ``` +## Chips + +![{6BB65B0C-C0E8-4F6E-ADC0-EB29FFDD93DA}](https://github.com/user-attachments/assets/7d573d74-65b0-4379-a4b7-2830bfd381cf) + +```xml + +``` + +## GigaChips + +![{466C440E-25EE-4CF1-985F-EC8105043D22}](https://github.com/user-attachments/assets/aea0e668-c02c-432c-9f3f-e8621e726444) + +```xml + +``` + ## 参阅 [Demo: SukiUI.Demo/Features/ControlsLibrary/TogglesView.axaml](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI.Demo/Features/ControlsLibrary/TogglesView.axaml) \ No newline at end of file From 5cdebef3a9e7975630069c2b29d6ff1c77359b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Sepulchre?= Date: Wed, 9 Oct 2024 11:31:41 +0200 Subject: [PATCH 03/10] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 519566771..a064b72eb 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,8 @@ SukiUI offer a versatile way to display unique toasts, to help you create nice i
-![dialogs](https://github.com/user-attachments/assets/f786d724-0cae-417a-bc60-69e4d1a2bfc0) +![dialogslight](https://github.com/user-attachments/assets/51f05964-e847-4ed6-a1f7-78616eea9cee) +

@@ -88,6 +89,7 @@ SukiUI offer a versatile way to display unique toasts, to help you create nice i SukiUI includes styles for the [Dock](https://github.com/wieslawsoltes/Dock) library. -![dock](https://github.com/user-attachments/assets/ef7ec55f-f13c-4214-b5ce-ad5ef3042868) + +![dockgradient](https://github.com/user-attachments/assets/828cf7f1-ca76-4e36-ab27-921c35f93280) From 31eb8c36430308b3821c14414d1f72b6b61a0222 Mon Sep 17 00:00:00 2001 From: Clement Sepulchre Date: Wed, 9 Oct 2024 12:09:33 +0200 Subject: [PATCH 04/10] gradient by default --- SukiUI.Demo/SukiUIDemoViewModel.cs | 2 +- SukiUI/Content/Shaders/Background/gradient.sksl | 6 +++--- SukiUI/Controls/SukiBackground.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SukiUI.Demo/SukiUIDemoViewModel.cs b/SukiUI.Demo/SukiUIDemoViewModel.cs index 3ba258b3c..bd57beb6b 100644 --- a/SukiUI.Demo/SukiUIDemoViewModel.cs +++ b/SukiUI.Demo/SukiUIDemoViewModel.cs @@ -34,7 +34,7 @@ public partial class SukiUIDemoViewModel : ObservableObject [ObservableProperty] private DemoPageBase? _activePage; [ObservableProperty] private bool _windowLocked; [ObservableProperty] private bool _titleBarVisible = true; - [ObservableProperty] private SukiBackgroundStyle _backgroundStyle = SukiBackgroundStyle.Bubble; + [ObservableProperty] private SukiBackgroundStyle _backgroundStyle = SukiBackgroundStyle.Gradient; [ObservableProperty] private bool _animationsEnabled; [ObservableProperty] private string? _customShaderFile; [ObservableProperty] private bool _transitionsEnabled; diff --git a/SukiUI/Content/Shaders/Background/gradient.sksl b/SukiUI/Content/Shaders/Background/gradient.sksl index 0daeb7dd5..531107cba 100644 --- a/SukiUI/Content/Shaders/Background/gradient.sksl +++ b/SukiUI/Content/Shaders/Background/gradient.sksl @@ -66,14 +66,14 @@ vec4 main(vec2 fragCoord) { float opacityLayer2 = 0.85 - (iDark / 2); - float iPrimaryOpacity = 0.2; // Exemple de nouvelle opacité pour iPrimary + float iPrimaryOpacity = 1.5; // Exemple de nouvelle opacité pour iPrimary if (iDark == 1) { iPrimaryOpacity = 0.4; } vec3 iPrimaryWithOpacity = iPrimary * iPrimaryOpacity; - float iAccentOpacity = 1; + float iAccentOpacity = -1.05; if (iDark == 1) { iAccentOpacity = 2; } @@ -89,7 +89,7 @@ vec4 main(vec2 fragCoord) { vec3 col; if (iDark == 0) { - col = blendOverlay(iBase, finalComp); + col = blendOverlay(iBase * 1.02, finalComp); } else { col = blendOverlayDark(iBase, finalComp); } diff --git a/SukiUI/Controls/SukiBackground.cs b/SukiUI/Controls/SukiBackground.cs index e8bdaa681..6a79f8d19 100644 --- a/SukiUI/Controls/SukiBackground.cs +++ b/SukiUI/Controls/SukiBackground.cs @@ -13,7 +13,7 @@ public class SukiBackground : Control { public static readonly StyledProperty StyleProperty = AvaloniaProperty.Register(nameof(Style), - defaultValue: SukiBackgroundStyle.Bubble); + defaultValue: SukiBackgroundStyle.Gradient); /// /// Which of the default background styles to use - DEFAULT: Gradient From 89cd006e7e6083fcadcbd2fd11ac0298f70d115d Mon Sep 17 00:00:00 2001 From: Clement Sepulchre Date: Wed, 9 Oct 2024 13:03:50 +0200 Subject: [PATCH 05/10] gradient overlay --- SukiUI/ColorTheme/Dark.axaml | 2 +- SukiUI/ColorTheme/Light.axaml | 6 +++--- SukiUI/Controls/SukiWindow.axaml.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SukiUI/ColorTheme/Dark.axaml b/SukiUI/ColorTheme/Dark.axaml index facb4f483..af1e60026 100644 --- a/SukiUI/ColorTheme/Dark.axaml +++ b/SukiUI/ColorTheme/Dark.axaml @@ -27,7 +27,7 @@ 1 4 17 0 #111111 - + diff --git a/SukiUI/ColorTheme/Light.axaml b/SukiUI/ColorTheme/Light.axaml index 38caa0bf7..7a72c8a14 100644 --- a/SukiUI/ColorTheme/Light.axaml +++ b/SukiUI/ColorTheme/Light.axaml @@ -2,7 +2,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=netstandard"> Transparent - #fafafa + #fcfcfc Transparent White #fdfefefe @@ -27,8 +27,8 @@ 1 4 17 0 #999999 - - + + diff --git a/SukiUI/Controls/SukiWindow.axaml.cs b/SukiUI/Controls/SukiWindow.axaml.cs index 25f73e912..151d7f3db 100644 --- a/SukiUI/Controls/SukiWindow.axaml.cs +++ b/SukiUI/Controls/SukiWindow.axaml.cs @@ -117,7 +117,7 @@ public bool BackgroundAnimationEnabled public static readonly StyledProperty BackgroundStyleProperty = AvaloniaProperty.Register(nameof(BackgroundStyle), - defaultValue: SukiBackgroundStyle.Bubble); + defaultValue: SukiBackgroundStyle.Gradient); /// public SukiBackgroundStyle BackgroundStyle From fb250933ae3cb4fe235e2c17718c521533c1992f Mon Sep 17 00:00:00 2001 From: Clement Sepulchre Date: Wed, 9 Oct 2024 13:28:13 +0200 Subject: [PATCH 06/10] toast gradient overlay --- SukiUI/Controls/SukiToast.axaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SukiUI/Controls/SukiToast.axaml b/SukiUI/Controls/SukiToast.axaml index 6364b7d9e..05faf8233 100644 --- a/SukiUI/Controls/SukiToast.axaml +++ b/SukiUI/Controls/SukiToast.axaml @@ -24,7 +24,7 @@ - + @@ -34,8 +34,8 @@ - - + + From dc33c8bada4c0d1e153c4b993b5d27e0f64a1b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Sepulchre?= Date: Wed, 9 Oct 2024 14:00:05 +0200 Subject: [PATCH 07/10] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a064b72eb..c6659f797 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,8 @@ Many thanks to [McCree Lee](https://github.com/AuroraZiling) for his work on the
-![colorthemes](https://github.com/user-attachments/assets/78f2ae9c-4fd7-4402-876f-791e5fb8a10a) +![sukicolorpresentation](https://github.com/user-attachments/assets/70fdaa99-6274-478a-bb2a-025a0b7f1182) +
From 113b99d4fbfbc83e9464ec640d43cd589794b83a Mon Sep 17 00:00:00 2001 From: Aaron Date: Thu, 10 Oct 2024 08:05:56 +0100 Subject: [PATCH 08/10] Fix #302 (At least partially) --- .../Features/ControlsLibrary/CardsView.axaml | 11 ++----- SukiUI/Controls/GlassMorphism/GlassCard.axaml | 29 +++++-------------- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/SukiUI.Demo/Features/ControlsLibrary/CardsView.axaml b/SukiUI.Demo/Features/ControlsLibrary/CardsView.axaml index 49caaf205..857885c44 100644 --- a/SukiUI.Demo/Features/ControlsLibrary/CardsView.axaml +++ b/SukiUI.Demo/Features/ControlsLibrary/CardsView.axaml @@ -36,12 +36,10 @@ - - @@ -66,23 +64,19 @@ - 0.2 + 0.5 - This card's resources sets the double resource of "GlassOpacity" to 0.2 + This card's resources sets the double resource of "GlassOpacity" to 0.5 - - - - @@ -103,7 +97,6 @@ - diff --git a/SukiUI/Controls/GlassMorphism/GlassCard.axaml b/SukiUI/Controls/GlassMorphism/GlassCard.axaml index d1a3ab064..5420fb49f 100644 --- a/SukiUI/Controls/GlassMorphism/GlassCard.axaml +++ b/SukiUI/Controls/GlassMorphism/GlassCard.axaml @@ -7,7 +7,6 @@ - - + Duration="0:0:0.5" + Easing="QuadraticEaseOut" /> + Duration="0:0:0.5" + Easing="QuadraticEaseOut" /> - - + - - - + - - - - - @@ -102,12 +91,10 @@ - - From 4e69c2582f3be86fb00f1ffee89e2f38e4d81893 Mon Sep 17 00:00:00 2001 From: Clement Sepulchre Date: Thu, 10 Oct 2024 12:18:18 +0200 Subject: [PATCH 09/10] menu light theme better border brush --- SukiUI/ColorTheme/Dark.axaml | 1 + SukiUI/ColorTheme/Light.axaml | 1 + SukiUI/Theme/ContextMenu.axaml | 2 +- SukiUI/Theme/Menu.axaml | 4 ++-- SukiUI/Theme/MenuFlyoutPresenter.axaml | 2 +- SukiUI/Theme/MenuItem.axaml | 3 ++- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/SukiUI/ColorTheme/Dark.axaml b/SukiUI/ColorTheme/Dark.axaml index af1e60026..236a530a1 100644 --- a/SukiUI/ColorTheme/Dark.axaml +++ b/SukiUI/ColorTheme/Dark.axaml @@ -14,6 +14,7 @@ #606060 #555555 #454545 + #454545 #252729 #edffffff diff --git a/SukiUI/ColorTheme/Light.axaml b/SukiUI/ColorTheme/Light.axaml index 7a72c8a14..e0207daa2 100644 --- a/SukiUI/ColorTheme/Light.axaml +++ b/SukiUI/ColorTheme/Light.axaml @@ -14,6 +14,7 @@ #cecece #e2e2e2 #f1f1f1 + #d7d7d7 #e3e3e7 #222222 diff --git a/SukiUI/Theme/ContextMenu.axaml b/SukiUI/Theme/ContextMenu.axaml index bf7573d16..24ab1d294 100644 --- a/SukiUI/Theme/ContextMenu.axaml +++ b/SukiUI/Theme/ContextMenu.axaml @@ -2,7 +2,7 @@ - + diff --git a/SukiUI/Theme/Menu.axaml b/SukiUI/Theme/Menu.axaml index 3645c7793..6e8049f8e 100644 --- a/SukiUI/Theme/Menu.axaml +++ b/SukiUI/Theme/Menu.axaml @@ -11,7 +11,7 @@ @@ -49,7 +49,7 @@ - + diff --git a/SukiUI/Theme/MenuItem.axaml b/SukiUI/Theme/MenuItem.axaml index d84559e10..f8fb5d399 100644 --- a/SukiUI/Theme/MenuItem.axaml +++ b/SukiUI/Theme/MenuItem.axaml @@ -7,6 +7,7 @@ + @@ -77,7 +78,7 @@ Date: Fri, 11 Oct 2024 10:40:03 +0200 Subject: [PATCH 10/10] card opacity light --- SukiUI/ColorTheme/Light.axaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SukiUI/ColorTheme/Light.axaml b/SukiUI/ColorTheme/Light.axaml index e0207daa2..65f62bab6 100644 --- a/SukiUI/ColorTheme/Light.axaml +++ b/SukiUI/ColorTheme/Light.axaml @@ -36,7 +36,7 @@ False True - 0.42 + 0.48 0.05 0.4