diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml
index 5f0a4b5..7882e33 100644
--- a/.github/workflows/pack.yml
+++ b/.github/workflows/pack.yml
@@ -1,4 +1,4 @@
-name: Pack
+name: Pack Nuget
on:
push:
@@ -7,8 +7,8 @@ on:
branches: [ "action/pack" ]
jobs:
- nuget_desktop:
- runs-on: windows-latest
+ nuget:
+ runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
@@ -25,34 +25,8 @@ jobs:
- name: Nuget Semi.Avalonia.TreeDataGrid
run: dotnet pack ./src/Semi.Avalonia.TreeDataGrid -o ./nugets
- - name: Desktop
- run: dotnet publish ./demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
-
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
- name: nuget_desktop
- path: |
- ./nugets
- ./**/publish/*.exe
-
- android:
- runs-on: windows-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4.1.1
-
- - name: CD Android
- run: cd ./demo/Semi.Avalonia.Demo.Android
-
- - name: Restore Dependencies
- run: dotnet restore
-
- - name: Build
- run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore
-
- - name: Upload a Build Artifact
- uses: actions/upload-artifact@v4.3.1
- with:
- name: android
- path: ./**/publish/*Signed.apk
+ name: nugets
+ path: ./nugets
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..81e01be
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,92 @@
+name: Publish Demo
+
+on:
+ push:
+ branches: [ "action/publish" ]
+ pull_request:
+ branches: [ "action/publish" ]
+
+jobs:
+ windows:
+ runs-on: windows-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4.1.1
+
+ - name: Make upload directory
+ run: mkdir upload
+
+ - name: Publish win-x64
+ run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win64
+
+ - name: Zip win-x64
+ run: |
+ $files = Get-ChildItem -Path ./publish/win64/* -Recurse -Exclude *.pdb
+ Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.zip
+
+ - name: Enable Native AOT in .csproj
+ run: |
+ sed -i 's##true#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
+ sed -i 's##true#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
+
+ - name: Publish win-x64 AOT
+ run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o ./publish/win64-aot
+
+ - name: Zip win-x64 AOT
+ run: |
+ $files = Get-ChildItem -Path ./publish/win64-aot/* -Recurse -Exclude *.pdb
+ Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT.zip
+
+ - name: Upload a Build Artifact
+ uses: actions/upload-artifact@v4.3.1
+ with:
+ name: windows
+ path: ./upload
+
+ linux:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4.1.1
+
+ - name: Make upload directory
+ run: mkdir upload
+
+ - name: Publish linux-x64
+ run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linux64
+
+ - name: Zip linux-x64
+ run: zip -j -r ./upload/Semi.Avalonia.Demo.Desktop.linux-x64.zip ./publish/linux64 -x "*.pdb"
+
+ - name: Publish linux-x64 DRM
+ run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/drm
+
+ - name: Zip linux-x64 DRM
+ run: zip -j -r ./upload/Semi.Avalonia.Demo.Drm.linux-x64.zip ./publish/drm -x "*.pdb"
+
+ - name: Upload a Build Artifact
+ uses: actions/upload-artifact@v4.3.1
+ with:
+ name: linux
+ path: ./upload
+
+ android:
+ runs-on: windows-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4.1.1
+
+ - name: CD Android
+ run: cd ./demo/Semi.Avalonia.Demo.Android
+
+ - name: Restore Dependencies
+ run: dotnet restore
+
+ - name: Publish Android
+ run: dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore -o ./publish
+
+ - name: Upload a Build Artifact
+ uses: actions/upload-artifact@v4.3.1
+ with:
+ name: android
+ path: ./publish/*Signed.apk
diff --git a/demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj b/demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
index d5a8648..d697ebd 100644
--- a/demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
+++ b/demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
@@ -5,10 +5,8 @@
enable
true
-
+
+
diff --git a/demo/Semi.Avalonia.Demo.Drm/Program.cs b/demo/Semi.Avalonia.Demo.Drm/Program.cs
index c690e85..5a7662f 100644
--- a/demo/Semi.Avalonia.Demo.Drm/Program.cs
+++ b/demo/Semi.Avalonia.Demo.Drm/Program.cs
@@ -3,6 +3,7 @@ using System.Globalization;
using System.Linq;
using System.Threading;
using Avalonia;
+using Avalonia.Dialogs;
namespace Semi.Avalonia.Demo.Drm;
@@ -28,7 +29,7 @@ class Program
if (args.Contains("--drm"))
{
SilenceConsole();
- return builder.StartLinuxDrm(args: args, card: "/dev/dri/card1", scaling: GetScaling());
+ return builder.StartLinuxDrm(args, scaling: GetScaling());
}
return builder.StartWithClassicDesktopLifetime(args);
@@ -37,7 +38,9 @@ class Program
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure()
+ .UseManagedSystemDialogs()
.UsePlatformDetect()
+ .With(new Win32PlatformOptions())
.LogToTrace();
private static void SilenceConsole()
diff --git a/demo/Semi.Avalonia.Demo.Drm/README.md b/demo/Semi.Avalonia.Demo.Drm/README.md
new file mode 100644
index 0000000..0990a36
--- /dev/null
+++ b/demo/Semi.Avalonia.Demo.Drm/README.md
@@ -0,0 +1,162 @@
+# DRM Start Steps
+
+[中文](README_CN.md)
+
+(Ubuntu 20.04 live server linux-x64 Virtual Machine Test Success)
+(Orange Pi Zero2 Ubuntu20.04-arm64 Test Success)
+
+[Avalonia Official Reference Document](https://docs.avaloniaui.net/docs/next/guides/platforms/rpi/running-on-raspbian-lite-via-drm)
+
+## Setup Running Environment
+
+1. Run the following commands on the Linux side
+```bash
+sudo apt update
+sudo apt upgrade
+sudo reboot
+sudo apt-get install libgbm1 libgl1-mesa-dri libegl1-mesa libinput10
+```
+
+2. Install the test tool (if a colored cube appears, the environment is installed)
+```bash
+sudo apt-get install kmscube
+sudo kmscube
+```
+
+3. [Install .NET Runtime](https://learn.microsoft.com/dotnet/core/install/linux?WT.mc_id=dotnet-35129-website)
+
+4. Add the Avalonia.LinuxFramebuffer package in NuGet
+
+```bash
+dotnet add package Avalonia.LinuxFramebuffer
+```
+
+5. Add StartLinuxDrm code
+
+```csharp
+public static int Main(string[] args)
+{
+ var builder = BuildAvaloniaApp();
+ if (args.Contains("--drm"))
+ {
+ SilenceConsole();
+ // By default, Avalonia will try to detect output card automatically.
+ // But you can specify one, for example "/dev/dri/card1".
+ return builder.StartLinuxDrm(args: args, card: null, scaling: 1.0);
+ }
+
+ return builder.StartWithClassicDesktopLifetime(args);
+}
+
+private static void SilenceConsole()
+{
+ new Thread(() =>
+ {
+ Console.CursorVisible = false;
+ while (true)
+ Console.ReadKey(true);
+ })
+ { IsBackground = true }.Start();
+}
+```
+
+6. Publish the app to Linux
+
+```bash
+dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linux-x64 --sc -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
+```
+
+Add the following code to the csproj file for AOT publishing
+
+```xml
+
+ true
+ true
+
+```
+
+```bash
+dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linu-x64
+```
+
+7. Run the program
+
+```bash
+sudo ./Semi.Avalonia.Demo.Drm --drm
+```
+
+## Troubleshooting
+
+1. Error message
+
+> Unhandled exception. Avalonia.Markup.Xaml.XamlLoadException: No precompiled XAML found for avares://Semi.Avalonia/Themes/Light/Light.axaml (baseUri: avares://Semi.Avalonia/Themes/Index.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource
+
+Solution:
+
+If you use the Semi release file, do not trim it, otherwise an error will occur.
+
+24.8.18 update: This issue has been fixed.
+
+2. Error message
+
+> Unhandled exception. System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.**
+ **--->System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies.In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
+ at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
+ at SkiaSharp.SKImageInfo..cctor()
+
+Solution:
+
+Linux CLI installation
+
+```bash
+sudo apt-get install -y libfontconfig1
+```
+[Reference](https://github.com/mono/SkiaSharp/issues/509)
+
+3. Error message
+
+> Permission denied
+
+Solution:
+
+add permission
+
+```bash
+sudo chmod +x ./Semi.Avalonia.Demo.Drm
+```
+
+4. Error message
+
+> Unhandled exception. System.ComponentModel.Win32Exception (95): drmModeGetResources failed
+at Avalonia.LinuxFramebuffer.Output.DrmResources..ctor(Int32 fd, Boolean connectorsForceProbe) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 91
+at Avalonia.LinuxFramebuffer.Output.DrmCard.GetResources(Boolean connectorsForceProbe) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 171
+at Avalonia.LinuxFramebuffer.Output.DrmOutput..ctor(String path, Boolean connectorsForceProbe, DrmOutputOptions options) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs:line 60
+at LinuxFramebufferPlatformExtensions.StartLinuxDrm(AppBuilder builder, String[] args, String card, Double scaling, IInputBackend inputBackend) in /_/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs:line 166
+at Semi.Avalonia.Demo.Drm.Program.Main(String[] args)
+
+Solution:
+
+The `program.cs` graphics card path is incorrect, it may not be `dev/dri/card1`, see if there are other graphics cards in the `dev/dri` directory such as `card0`.
+
+24.8.18 update: Avalonia will now automatically detect the graphics card path, so you don't need to specify the graphics card path.
+
+```csharp
+return builder.StartLinuxDrm(args: args, card: null, scaling: 1.0);
+```
+
+5. Error message
+>Unhandled exception. System.ComponentModel.Win32Exception (2): Couldn't open /dev/dri/card1
+at Avalonia.LinuxFramebuffer.Output.DrmCard..ctor(String ) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 167
+at Avalonia.LinuxFramebuffer.Output.DrmOutput..ctor(String , Boolean , DrmOutputOptions ) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs:line 58
+at LinuxFramebufferPlatformExtensions.StartLinuxDrm(AppBuilder, String[], String , Double , IInputBackend ) in /_/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs:line 166
+at Semi.Avalonia.Demo.Drm.Program.Main(String[])
+
+Solution:
+
+Unable to open `/dev/dri/card1`, may be the graphics card is mounted to another folder.
+
+24.8.18 update: Avalonia will now automatically detect the graphics card path, so you don't need to specify the graphics card path.
+
+```csharp
+return builder.StartLinuxDrm(args: args, card: null, scaling: 1.0);
+```
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo.Drm/README_CN.md b/demo/Semi.Avalonia.Demo.Drm/README_CN.md
new file mode 100644
index 0000000..740d8a1
--- /dev/null
+++ b/demo/Semi.Avalonia.Demo.Drm/README_CN.md
@@ -0,0 +1,162 @@
+# DRM启动步骤
+
+[English](README.md)
+
+(Ubuntu 20.04 live server linux-x64 虚拟机测试成功)
+(Orange Pi Zero2 Ubuntu20.04-arm64 测试成功)
+
+[Avalonia 官方参考文档](https://docs.avaloniaui.net/docs/next/guides/platforms/rpi/running-on-raspbian-lite-via-drm)
+
+## 搭建运行环境
+
+1. Linux端运行命令
+```bash
+sudo apt update
+sudo apt upgrade
+sudo reboot
+sudo apt-get install libgbm1 libgl1-mesa-dri libegl1-mesa libinput10
+```
+
+2. 安装测试工具(出现一个彩色立方体说明环境安装完成)
+```bash
+sudo apt-get install kmscube
+sudo kmscube
+```
+
+3. [安装.net运行时](https://learn.microsoft.com/dotnet/core/install/linux?WT.mc_id=dotnet-35129-website)
+
+4. NuGet里面添加Avalonia.LinuxFramebuffer包
+
+```bash
+dotnet add package Avalonia.LinuxFramebuffer
+```
+
+5. 添加StartLinuxDrm代码
+
+```csharp
+public static int Main(string[] args)
+{
+ var builder = BuildAvaloniaApp();
+ if (args.Contains("--drm"))
+ {
+ SilenceConsole();
+ // By default, Avalonia will try to detect output card automatically.
+ // But you can specify one, for example "/dev/dri/card1".
+ return builder.StartLinuxDrm(args: args, card: null, scaling: 1.0);
+ }
+
+ return builder.StartWithClassicDesktopLifetime(args);
+}
+
+private static void SilenceConsole()
+{
+ new Thread(() =>
+ {
+ Console.CursorVisible = false;
+ while (true)
+ Console.ReadKey(true);
+ })
+ { IsBackground = true }.Start();
+}
+```
+
+6. 发布程序到Linux
+
+```bash
+dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linux-x64 --sc -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
+```
+
+AOT发布需要在csproj文件中添加以下代码
+
+```xml
+
+ true
+ true
+
+```
+
+```bash
+dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linu-x64
+```
+
+7. 运行程序
+
+```bash
+sudo ./Semi.Avalonia.Demo.Drm --drm
+```
+
+## 报错处理
+
+1. 报错内容
+
+> Unhandled exception. Avalonia.Markup.Xaml.XamlLoadException: No precompiled XAML found for avares://Semi.Avalonia/Themes/Light/Light.axaml (baseUri: avares://Semi.Avalonia/Themes/Index.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource
+
+解决方法:
+
+如果使用Semi发布文件不要裁剪,如果裁剪会报错。
+
+24.8.18更新:现在已经修复了这个问题。
+
+2. 报错内容
+
+> Unhandled exception. System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.**
+ **--->System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies.In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
+ at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
+ at SkiaSharp.SKImageInfo..cctor()
+
+解决方法:
+
+Linux 命令行安装
+
+```bash
+sudo apt-get install -y libfontconfig1
+```
+
+[参考网址](https://github.com/mono/SkiaSharp/issues/509)
+
+3. 报错内容
+
+> Permission denied
+
+解决方法:
+
+添加执行权限
+```bash
+sudo chmod +x ./Semi.Avalonia.Demo.Drm
+```
+
+4. 报错内容
+
+> Unhandled exception. System.ComponentModel.Win32Exception (95): drmModeGetResources failed
+at Avalonia.LinuxFramebuffer.Output.DrmResources..ctor(Int32 fd, Boolean connectorsForceProbe) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 91
+at Avalonia.LinuxFramebuffer.Output.DrmCard.GetResources(Boolean connectorsForceProbe) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 171
+at Avalonia.LinuxFramebuffer.Output.DrmOutput..ctor(String path, Boolean connectorsForceProbe, DrmOutputOptions options) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs:line 60
+at LinuxFramebufferPlatformExtensions.StartLinuxDrm(AppBuilder builder, String[] args, String card, Double scaling, IInputBackend inputBackend) in /_/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs:line 166
+at Semi.Avalonia.Demo.Drm.Program.Main(String[] args)
+
+解决方法:
+
+`program.cs`的显卡路径错误,可能不是`dev/dri/card1`,看在`dev/dri`目录下有无其他的显卡如`card0`。
+
+24.8.18更新:现在Avalonia会自动检测显卡路径,所以不需要指定显卡路径。
+
+```csharp
+return builder.StartLinuxDrm(args: args, card: null, scaling: 1.0);
+```
+
+5. 报错内容
+>Unhandled exception. System.ComponentModel.Win32Exception (2): Couldn't open /dev/dri/card1
+at Avalonia.LinuxFramebuffer.Output.DrmCard..ctor(String ) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 167
+at Avalonia.LinuxFramebuffer.Output.DrmOutput..ctor(String , Boolean , DrmOutputOptions ) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs:line 58
+at LinuxFramebufferPlatformExtensions.StartLinuxDrm(AppBuilder, String[], String , Double , IInputBackend ) in /_/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs:line 166
+at Semi.Avalonia.Demo.Drm.Program.Main(String[])
+
+解决办法:
+
+找不到显卡路径`dev/dri/card1`,可能是显卡挂载到别的文件夹下了。
+
+24.8.18更新:现在Avalonia会自动检测显卡路径,所以不需要指定显卡路径。
+
+```csharp
+return builder.StartLinuxDrm(args: args, card: null, scaling: 1.0);
+```
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo.Drm/Roots.xml b/demo/Semi.Avalonia.Demo.Drm/Roots.xml
new file mode 100644
index 0000000..7e2f055
--- /dev/null
+++ b/demo/Semi.Avalonia.Demo.Drm/Roots.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj b/demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj
index 7accf7a..2671f20 100644
--- a/demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj
+++ b/demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj
@@ -1,22 +1,35 @@
-
- WinExe
- net7.0
- enable
- true
- app.manifest
-
+
+ WinExe
+ net8.0
+ enable
+ true
+
+
+
+
+
+ true
+ true
+
-
-
-
-
-
-
+
+ app.manifest
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/Semi.Avalonia.Demo.Drm/使用方法.md b/demo/Semi.Avalonia.Demo.Drm/使用方法.md
deleted file mode 100644
index 870b6a2..0000000
--- a/demo/Semi.Avalonia.Demo.Drm/使用方法.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# DRM启动步骤
-
-(Ubuntu18.04Server版本 虚拟机测试OK)
-(Orange Pi Zero2 Ubuntu20.04-arm64 测试OK)
-
-Avalonia官方参考文档:https://docs.avaloniaui.net/docs/next/guides/platforms/rpi/running-on-raspbian-lite-via-drm
-
-1.Linux端运行命令
-```
-sudo apt update
-sudo apt upgrade
-sudo reboot
-sudo apt - get install libgbm1 libgl1 - mesa - dri libegl1 - mesa libinput10
-```
-
-2.安装测试工具测试(出现一个彩色立方体说明环境安装完成)
-```
-sudo apt-get install kmscube
-sudo kmscube
-```
-
-3.安装.net运行时(参考网址:https://learn.microsoft.com/zh-cn/dotnet/core/install/linux?WT.mc_id=dotnet-35129-website)
-
-4.新建一个Avalonia项目,nuget里面添加Avalonia.LinuxFramebuffer包
-
-5.添加StartLinuxDrm代码(不知道怎么添加看Semi.Avalonia.Demo.Drm项目代码)
-
-6.发布程序到Linux(安装.net,怎么运行这些省略)
-
-7.运行 ./Semi.Avalonia.Demo.Drm --drm
-
-## 报错处理:
-
-1. 报错内容
-
->Unhandled exception. Avalonia.Markup.Xaml.XamlLoadException: No precompiled XAML found for avares://Semi.Avalonia/Themes/Light/Light.axaml (baseUri: avares://Semi.Avalonia/Themes/Index.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource
-
- 解决方法:
->如果使用Semi发布文件不要裁剪,如果裁剪会报错
-
-
-2. 报错内容
->Unhandled exception. System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.**
- **--->System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies.In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
- at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
- at SkiaSharp.SKImageInfo..cctor()
-
-解决方法:
->Linux命令行安装一下 apt-get install -y libfontconfig1
-参考网址:https://github.com/mono/SkiaSharp/issues/509
-
-3. 报错内容
->Permission denied
-
-解决方法:
->sudo chmod +x ./Semi.Avalonia.Demo.Drm
-
-4. 报错内容
->Unhandled exception. System.ComponentModel.Win32Exception (95): drmModeGetResources failed
-at Avalonia.LinuxFramebuffer.Output.DrmResources..ctor(Int32 fd, Boolean connectorsForceProbe) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 91
-at Avalonia.LinuxFramebuffer.Output.DrmCard.GetResources(Boolean connectorsForceProbe) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 171
-at Avalonia.LinuxFramebuffer.Output.DrmOutput..ctor(String path, Boolean connectorsForceProbe, DrmOutputOptions options) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs:line 60
-at LinuxFramebufferPlatformExtensions.StartLinuxDrm(AppBuilder builder, String[] args, String card, Double scaling, IInputBackend inputBackend) in /_/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs:line 166
-at Semi.Avalonia.Demo.Drm.Program.Main(String[] args)
-
-解决方法:
->`program.cs`的显卡路径错误,可能不是`dev/dri/card1`,看在`dev/dri`目录下有无其他的显卡如`card0`。
-
-5. 报错内容
->Unhandled exception. System.ComponentModel.Win32Exception (2): Couldn't open /dev/dri/card1
-at Avalonia.LinuxFramebuffer.Output.DrmCard..ctor(String ) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:line 167
-at Avalonia.LinuxFramebuffer.Output.DrmOutput..ctor(String , Boolean , DrmOutputOptions ) in /_/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs:line 58
-at LinuxFramebufferPlatformExtensions.StartLinuxDrm(AppBuilder, String[], String , Double , IInputBackend ) in /_/src/Linux/Avalonia.LinuxFramebuffer/LinuxFramebufferPlatform.cs:line 166
-at Semi.Avalonia.Demo.Drm.Program.Main(String[])
-
-解决办法:
->找不到显卡路径`dev/dri/card1`,可能是显卡挂载到别的文件夹下了,待解决。
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/Pages/CalendarDatePickerDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/CalendarDatePickerDemo.axaml
index 44a1413..4730e62 100644
--- a/demo/Semi.Avalonia.Demo/Pages/CalendarDatePickerDemo.axaml
+++ b/demo/Semi.Avalonia.Demo/Pages/CalendarDatePickerDemo.axaml
@@ -8,11 +8,22 @@
d:DesignWidth="800"
mc:Ignorable="d">
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
-
-
-
-
-
+
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml
index 488a8ff..1595b4a 100644
--- a/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml
+++ b/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml
@@ -4,71 +4,40 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- d:DesignHeight="450"
+ xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
+ d:DesignHeight="800"
d:DesignWidth="800"
mc:Ignorable="d">
+
+
+
-
- Ding
- Otter
- Husky
- Mr. 17
- Cass
-
-
- Ding
- Otter
- Husky
- Mr. 17
- Cass
-
-
- Ding
- Otter
- Husky
- Mr. 17
- Cass
-
-
- Ding
- Otter
- Husky
- Mr. 17
- Cass
-
-
- Ding
- Otter
- Husky
- Mr. 17
- Cass
-
-
- Ding
- Otter
- Husky
- Mr. 17
- Cass
-
-
- Ding
- Otter
- Husky
- Mr. 17
- Cass
-
-
- Ding
- Otter
- Husky
- Mr. 17
- Cass
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs
index 80b05bc..3c8cba2 100644
--- a/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs
+++ b/demo/Semi.Avalonia.Demo/Pages/ComboBoxDemo.axaml.cs
@@ -1,6 +1,6 @@
-using Avalonia;
+using System.Collections.ObjectModel;
using Avalonia.Controls;
-using Avalonia.Markup.Xaml;
+using CommunityToolkit.Mvvm.ComponentModel;
namespace Semi.Avalonia.Demo.Pages;
@@ -9,5 +9,11 @@ public partial class ComboBoxDemo : UserControl
public ComboBoxDemo()
{
InitializeComponent();
+ this.DataContext = new ComboBoxDemoViewModel();
}
+}
+
+public class ComboBoxDemoViewModel : ObservableObject
+{
+ public ObservableCollection Items { get; set; } = ["Ding", "Otter", "Husky", "Mr.17", "Cass"];
}
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/Pages/DataGridDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/DataGridDemo.axaml
index ba7f847..d2c8add 100644
--- a/demo/Semi.Avalonia.Demo/Pages/DataGridDemo.axaml
+++ b/demo/Semi.Avalonia.Demo/Pages/DataGridDemo.axaml
@@ -14,7 +14,10 @@
-
+
+
+
+
diff --git a/demo/Semi.Avalonia.Demo/Pages/ManagedFileChooserDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ManagedFileChooserDemo.axaml
index dcb845f..418e8c4 100644
--- a/demo/Semi.Avalonia.Demo/Pages/ManagedFileChooserDemo.axaml
+++ b/demo/Semi.Avalonia.Demo/Pages/ManagedFileChooserDemo.axaml
@@ -8,8 +8,13 @@
d:DesignWidth="800"
mc:Ignorable="d">
-
-
-
+
+
+
+
+
+
diff --git a/demo/Semi.Avalonia.Demo/Pages/ManagedFileChooserDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ManagedFileChooserDemo.axaml.cs
index 18d5ab2..80fdf60 100644
--- a/demo/Semi.Avalonia.Demo/Pages/ManagedFileChooserDemo.axaml.cs
+++ b/demo/Semi.Avalonia.Demo/Pages/ManagedFileChooserDemo.axaml.cs
@@ -1,10 +1,6 @@
-using System;
using System.Collections.Generic;
-using Avalonia;
using Avalonia.Controls;
-using Avalonia.Dialogs;
using Avalonia.Interactivity;
-using Avalonia.Markup.Xaml;
using Avalonia.Platform.Storage;
namespace Semi.Avalonia.Demo.Pages;
@@ -14,14 +10,14 @@ public partial class ManagedFileChooserDemo : UserControl
public ManagedFileChooserDemo()
{
InitializeComponent();
- openFileDialog.Click += OpenFileDialog;
- selectFolderDialog.Click += SelectFolderDialog;
- saveFileDialog.Click += SaveFileDialog;
+ OpenFileButton.Click += OpenFileDialog;
+ SelectFolderButton.Click += SelectFolderDialog;
+ SaveFileButton.Click += SaveFileDialog;
}
- private async void OpenFileDialog(object sender, RoutedEventArgs args)
+ private async void OpenFileDialog(object? sender, RoutedEventArgs args)
{
- IStorageProvider? sp = GetStorageProvider();
+ var sp = GetStorageProvider();
if (sp is null) return;
var result = await sp.OpenFilePickerAsync(new FilePickerOpenOptions()
{
@@ -30,9 +26,10 @@ public partial class ManagedFileChooserDemo : UserControl
AllowMultiple = true,
});
}
- private async void SelectFolderDialog(object sender, RoutedEventArgs args)
+
+ private async void SelectFolderDialog(object? sender, RoutedEventArgs args)
{
- IStorageProvider? sp = GetStorageProvider();
+ var sp = GetStorageProvider();
if (sp is null) return;
var result = await sp.OpenFolderPickerAsync(new FolderPickerOpenOptions()
{
@@ -40,16 +37,17 @@ public partial class ManagedFileChooserDemo : UserControl
AllowMultiple = true,
});
}
- private async void SaveFileDialog(object sender, RoutedEventArgs args)
+
+ private async void SaveFileDialog(object? sender, RoutedEventArgs args)
{
- IStorageProvider? sp = GetStorageProvider();
+ var sp = GetStorageProvider();
if (sp is null) return;
var result = await sp.SaveFilePickerAsync(new FilePickerSaveOptions()
{
- Title = "Open File",
+ Title = "Save File",
});
}
-
+
private IStorageProvider? GetStorageProvider()
{
var topLevel = TopLevel.GetTopLevel(this);
@@ -58,10 +56,10 @@ public partial class ManagedFileChooserDemo : UserControl
List? GetFileTypes()
{
- return new List
- {
+ return
+ [
FilePickerFileTypes.All,
FilePickerFileTypes.TextPlain
- };
+ ];
}
}
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml
index f4dcf01..684441c 100644
--- a/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml
+++ b/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml
@@ -7,11 +7,23 @@
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs
index 65a0955..335774a 100644
--- a/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs
+++ b/demo/Semi.Avalonia.Demo/Pages/NotificationDemo.axaml.cs
@@ -22,13 +22,22 @@ public partial class NotificationDemo : UserControl
_manager = new WindowNotificationManager(topLevel) { MaxItems = 3 };
}
- private void InfoButton_OnClick(object? sender, RoutedEventArgs e)
+ private void NormalButton_OnClick(object? sender, RoutedEventArgs e)
{
if (sender is Button b && b.Content is string s)
{
- _manager?.Show(Enum.TryParse(s, out NotificationType t)
+ _manager?.Show(Enum.TryParse(s, out var t)
? new Notification(t.ToString(), "This is message", t)
: new Notification(s, "This is message"));
}
}
+
+ private void PositionButton_OnClick(object? sender, RoutedEventArgs e)
+ {
+ if (sender is RadioButton b && b.Content is string s)
+ {
+ Enum.TryParse(s, out var t);
+ _manager.Position = t;
+ }
+ }
}
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml
index c7ddf33..821c54d 100644
--- a/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml
+++ b/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml
@@ -24,8 +24,9 @@
+ Classes="ClearButton RevealPasswordButton"
+ PasswordChar="*"
+ Text="123456" />
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Semi.Avalonia.DataGrid/DataGrid.axaml b/src/Semi.Avalonia.DataGrid/DataGrid.axaml
index e9a5a88..7793490 100644
--- a/src/Semi.Avalonia.DataGrid/DataGrid.axaml
+++ b/src/Semi.Avalonia.DataGrid/DataGrid.axaml
@@ -471,6 +471,7 @@
+
@@ -570,5 +571,15 @@
+
+
+
+
diff --git a/src/Semi.Avalonia.DataGrid/Light.axaml b/src/Semi.Avalonia.DataGrid/Light.axaml
index 0f6219d..60c32a6 100644
--- a/src/Semi.Avalonia.DataGrid/Light.axaml
+++ b/src/Semi.Avalonia.DataGrid/Light.axaml
@@ -20,7 +20,6 @@
-
diff --git a/src/Semi.Avalonia/Controls/AdornerLayer.axaml b/src/Semi.Avalonia/Controls/AdornerLayer.axaml
index 1093deb..03a7694 100644
--- a/src/Semi.Avalonia/Controls/AdornerLayer.axaml
+++ b/src/Semi.Avalonia/Controls/AdornerLayer.axaml
@@ -5,11 +5,8 @@
-
+
diff --git a/src/Semi.Avalonia/Controls/CalendarDatePicker.axaml b/src/Semi.Avalonia/Controls/CalendarDatePicker.axaml
index 16bb361..9d36342 100644
--- a/src/Semi.Avalonia/Controls/CalendarDatePicker.axaml
+++ b/src/Semi.Avalonia/Controls/CalendarDatePicker.axaml
@@ -27,115 +27,112 @@
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="{TemplateBinding CornerRadius}">
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ BoxShadow="{DynamicResource CalendarDatePickerPopupBoxShadows}"
+ CornerRadius="{DynamicResource CalendarCornerRadius}">
+
+
+
+
+
-
+
+
-
+
-
+
+
-
-
@@ -159,9 +162,18 @@
-
@@ -222,6 +234,10 @@
+
+
+
@@ -303,5 +323,6 @@
+
diff --git a/src/Semi.Avalonia/Controls/ContextMenu.axaml b/src/Semi.Avalonia/Controls/ContextMenu.axaml
index 433707a..e3b2bbb 100644
--- a/src/Semi.Avalonia/Controls/ContextMenu.axaml
+++ b/src/Semi.Avalonia/Controls/ContextMenu.axaml
@@ -26,7 +26,7 @@
BorderThickness="{TemplateBinding BorderThickness}"
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
CornerRadius="{TemplateBinding CornerRadius}">
-
+
+ Text="{DynamicResource STRING_DATEPICKER_DAY_TEXT}" />
+ Text="{DynamicResource STRING_DATEPICKER_YEAR_TEXT}" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -191,7 +201,7 @@
BorderThickness="{DynamicResource MenuFlyoutBorderThickness}"
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
CornerRadius="{DynamicResource MenuFlyoutCornerRadius}">
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -23,12 +37,13 @@
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
- ClipToBounds="False"
+ ClipToBounds="True"
CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False">
-
-
-
+
+
+
+
+ Hello, Semi.Avalonia!
+
+
+
-
-
-
-
-
-
+
+ Data="{DynamicResource NotificationCardInformationIconPathData}" />
-
-
+
-
-
diff --git a/src/Semi.Avalonia/Controls/RadioButton.axaml b/src/Semi.Avalonia/Controls/RadioButton.axaml
index a5125b9..e9f369a 100644
--- a/src/Semi.Avalonia/Controls/RadioButton.axaml
+++ b/src/Semi.Avalonia/Controls/RadioButton.axaml
@@ -39,7 +39,11 @@
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -97,8 +74,8 @@
TextWrapping="{TemplateBinding TextWrapping}">
-
-
+
+
@@ -115,8 +92,7 @@
SelectionEnd="{TemplateBinding SelectionEnd}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
SelectionStart="{TemplateBinding SelectionStart}"
- Text="{TemplateBinding Text,
- Mode=TwoWay}"
+ Text="{TemplateBinding Text, Mode=TwoWay}"
TextAlignment="{TemplateBinding TextAlignment}"
TextWrapping="{TemplateBinding TextWrapping}" />
@@ -132,8 +108,7 @@
Name="PART_RevealButton"
Grid.Column="3"
Margin="4,0,0,0"
- IsChecked="{TemplateBinding RevealPassword,
- Mode=TwoWay}"
+ IsChecked="{TemplateBinding RevealPassword, Mode=TwoWay}"
IsVisible="False"
Theme="{StaticResource InputToggleButton}" />
-
+
@@ -276,7 +251,7 @@
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
-
+
+ TextWrapping="{TemplateBinding TextWrapping}">
+
+
+
+
+
+
+
+
+
+
@@ -361,5 +361,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Controls/TimePicker.axaml b/src/Semi.Avalonia/Controls/TimePicker.axaml
index 3e34bd6..fe2539a 100644
--- a/src/Semi.Avalonia/Controls/TimePicker.axaml
+++ b/src/Semi.Avalonia/Controls/TimePicker.axaml
@@ -176,7 +176,8 @@
VerticalAlignment="Center"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
- FontWeight="{TemplateBinding FontWeight}" />
+ FontWeight="{TemplateBinding FontWeight}"
+ Text="{DynamicResource STRING_TIMEPICKER_HOUR_TEXT}" />
+ FontWeight="{TemplateBinding FontWeight}"
+ Text="{DynamicResource STRING_TIMEPICKER_MINUTE_TEXT}" />
+
+
+
+
+
+ RowDefinitions="Auto,*"
+ ColumnDefinitions="Auto, *">
-
-
-
-
-
-
-
-
-
+ Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
@@ -149,6 +179,22 @@
+
+
+
+
+
+
+
+
+
@@ -188,6 +240,12 @@
+
+
+
+
+
-
-
-
+
+
+
-
+
@@ -225,29 +283,29 @@
x:Key="SimpleToggleSwitch"
BasedOn="{StaticResource {x:Type ToggleSwitch}}"
TargetType="ToggleSwitch">
+
+
+
-
+ Width="{DynamicResource ToggleSwitchDefaultWidth}"
+ Height="{DynamicResource ToggleSwitchDefaultHeight}"
+ CornerRadius="100">
+
+
+
+
+
-
-
-
-
-
-
+ ColumnDefinitions="*,*">
@@ -261,11 +319,74 @@
Background="White"
BoxShadow="0 0 1 1 #222E3238"
CornerRadius="100" />
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Locale/en-us.axaml b/src/Semi.Avalonia/Locale/en-us.axaml
index a963085..e41759c 100644
--- a/src/Semi.Avalonia/Locale/en-us.axaml
+++ b/src/Semi.Avalonia/Locale/en-us.axaml
@@ -1,6 +1,13 @@
+
+ day
+ month
+ year
+
+ hour
+ minute
Cut
Copy
diff --git a/src/Semi.Avalonia/Locale/ja-jp.axaml b/src/Semi.Avalonia/Locale/ja-jp.axaml
new file mode 100644
index 0000000..e9d10f8
--- /dev/null
+++ b/src/Semi.Avalonia/Locale/ja-jp.axaml
@@ -0,0 +1,24 @@
+
+
+ 日
+ 月
+ 年
+
+ 時
+ 分
+
+ 切り取り
+ コピー
+ 貼り付け
+
+ ファイル名
+ 隠しファイルを表示
+ 確認
+ キャンセル
+ 名前
+ 更新日時
+ 種類
+ サイズ
+
diff --git a/src/Semi.Avalonia/Locale/ja-jp.axaml.cs b/src/Semi.Avalonia/Locale/ja-jp.axaml.cs
new file mode 100644
index 0000000..d054d32
--- /dev/null
+++ b/src/Semi.Avalonia/Locale/ja-jp.axaml.cs
@@ -0,0 +1,8 @@
+using Avalonia.Controls;
+
+namespace Semi.Avalonia.Locale;
+
+public class ja_jp: ResourceDictionary
+{
+
+}
diff --git a/src/Semi.Avalonia/Locale/ru-ru.axaml b/src/Semi.Avalonia/Locale/ru-ru.axaml
new file mode 100644
index 0000000..cfa1e30
--- /dev/null
+++ b/src/Semi.Avalonia/Locale/ru-ru.axaml
@@ -0,0 +1,25 @@
+
+
+ день
+ месяц
+ год
+
+ часы
+ минуты
+ секунды
+
+ Вырезать
+ Копировать
+ Вставить
+
+ Имя файла
+ Показать скрытые файлы
+ OK
+ Отмена
+ Имя
+ Дата изменения
+ Тип
+ Размер
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Locale/ru-ru.axaml.cs b/src/Semi.Avalonia/Locale/ru-ru.axaml.cs
new file mode 100644
index 0000000..ad9bc07
--- /dev/null
+++ b/src/Semi.Avalonia/Locale/ru-ru.axaml.cs
@@ -0,0 +1,8 @@
+using Avalonia.Controls;
+
+namespace Semi.Avalonia.Locale;
+
+public class ru_ru : ResourceDictionary
+{
+
+}
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Locale/zh-cn.axaml b/src/Semi.Avalonia/Locale/zh-cn.axaml
index 6101cb5..e46fe54 100644
--- a/src/Semi.Avalonia/Locale/zh-cn.axaml
+++ b/src/Semi.Avalonia/Locale/zh-cn.axaml
@@ -1,6 +1,13 @@
+
+ 日
+ 月
+ 年
+
+ 时
+ 分
剪切
复制
diff --git a/src/Semi.Avalonia/Themes/Dark/AdornerLayer.axaml b/src/Semi.Avalonia/Themes/Dark/AdornerLayer.axaml
index 6899102..c380958 100644
--- a/src/Semi.Avalonia/Themes/Dark/AdornerLayer.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/AdornerLayer.axaml
@@ -1,3 +1,3 @@
-
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml b/src/Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml
index 76fd6b9..7e13458 100644
--- a/src/Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml
@@ -1,5 +1,5 @@
0 0 8 0 #1AFFFFFF
-
-
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/Border.axaml b/src/Semi.Avalonia/Themes/Dark/Border.axaml
index 25d26fc..4d61729 100644
--- a/src/Semi.Avalonia/Themes/Dark/Border.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/Border.axaml
@@ -1,5 +1,5 @@
+ 0 0 14 0 #1AFFFFFF
- 0 0 14 0 #1AFFFFFF
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/Button.axaml b/src/Semi.Avalonia/Themes/Dark/Button.axaml
index 2f9ff5a..73279bf 100644
--- a/src/Semi.Avalonia/Themes/Dark/Button.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/Button.axaml
@@ -82,7 +82,7 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/ButtonSpinner.axaml b/src/Semi.Avalonia/Themes/Dark/ButtonSpinner.axaml
index 2aeac3b..86a3abd 100644
--- a/src/Semi.Avalonia/Themes/Dark/ButtonSpinner.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/ButtonSpinner.axaml
@@ -1,8 +1,8 @@
-
+
-
+
-
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/Calendar.axaml b/src/Semi.Avalonia/Themes/Dark/Calendar.axaml
index e9f48c2..9b994ad 100644
--- a/src/Semi.Avalonia/Themes/Dark/Calendar.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/Calendar.axaml
@@ -1,17 +1,17 @@
-
+
-
+
-
+
-
+
@@ -24,7 +24,7 @@
-
+
diff --git a/src/Semi.Avalonia/Themes/Dark/CalendarDatePicker.axaml b/src/Semi.Avalonia/Themes/Dark/CalendarDatePicker.axaml
index 962d533..817c7e1 100644
--- a/src/Semi.Avalonia/Themes/Dark/CalendarDatePicker.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/CalendarDatePicker.axaml
@@ -10,7 +10,7 @@
0 0 8 0 #1AFFFFFF
-
+
-
-
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/CheckBox.axaml b/src/Semi.Avalonia/Themes/Dark/CheckBox.axaml
index 964a754..c620699 100644
--- a/src/Semi.Avalonia/Themes/Dark/CheckBox.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/CheckBox.axaml
@@ -20,15 +20,15 @@
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/ComboBox.axaml b/src/Semi.Avalonia/Themes/Dark/ComboBox.axaml
index 29fc605..5d8a707 100644
--- a/src/Semi.Avalonia/Themes/Dark/ComboBox.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/ComboBox.axaml
@@ -1,27 +1,31 @@
+
-
+
+
+
0 0 8 0 #1AFFFFFF
-
-
+
+
+
@@ -30,9 +34,11 @@
-
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/DataValidationErrors.axaml b/src/Semi.Avalonia/Themes/Dark/DataValidationErrors.axaml
index 45a1849..40df42c 100644
--- a/src/Semi.Avalonia/Themes/Dark/DataValidationErrors.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/DataValidationErrors.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml b/src/Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml
index 6f0ecc8..8a9b1a9 100644
--- a/src/Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml
@@ -1,6 +1,6 @@
-
+
@@ -9,7 +9,7 @@
-
+
diff --git a/src/Semi.Avalonia/Themes/Dark/Expander.axaml b/src/Semi.Avalonia/Themes/Dark/Expander.axaml
index 691b55b..9e41ae3 100644
--- a/src/Semi.Avalonia/Themes/Dark/Expander.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/Expander.axaml
@@ -1,5 +1,5 @@
-
+
diff --git a/src/Semi.Avalonia/Themes/Dark/Flyout.axaml b/src/Semi.Avalonia/Themes/Dark/Flyout.axaml
index 87a6de1..6e2a1fb 100644
--- a/src/Semi.Avalonia/Themes/Dark/Flyout.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/Flyout.axaml
@@ -1,6 +1,6 @@
-
+
-
+
0 0 8 0 #1AFFFFFF
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/HeaderedContentControl.axaml b/src/Semi.Avalonia/Themes/Dark/HeaderedContentControl.axaml
index 79315cc..c5804df 100644
--- a/src/Semi.Avalonia/Themes/Dark/HeaderedContentControl.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/HeaderedContentControl.axaml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/ListBox.axaml b/src/Semi.Avalonia/Themes/Dark/ListBox.axaml
index 5d0bd41..01b9e96 100644
--- a/src/Semi.Avalonia/Themes/Dark/ListBox.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/ListBox.axaml
@@ -5,8 +5,8 @@
-
-
+
+
@@ -21,17 +21,17 @@
-
+
-
+
-
+
@@ -50,7 +50,7 @@
-
+
@@ -79,16 +79,16 @@
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/Menu.axaml b/src/Semi.Avalonia/Themes/Dark/Menu.axaml
index cd613ce..91175d7 100644
--- a/src/Semi.Avalonia/Themes/Dark/Menu.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/Menu.axaml
@@ -2,15 +2,15 @@
-
-
+
+
0 0 8 0 #1AFFFFFF
-
+
-
+
diff --git a/src/Semi.Avalonia/Themes/Dark/NotificationCard.axaml b/src/Semi.Avalonia/Themes/Dark/NotificationCard.axaml
index 8c8e318..8012771 100644
--- a/src/Semi.Avalonia/Themes/Dark/NotificationCard.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/NotificationCard.axaml
@@ -1,10 +1,11 @@
-
-
+
- 0 0 8 0 #1AFFFFFF
-
+ inset 0 0 0 1 #1AFFFFFF, 0 4 14 0 #40000000
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/RadioButton.axaml b/src/Semi.Avalonia/Themes/Dark/RadioButton.axaml
index d4f2811..fe1e7b0 100644
--- a/src/Semi.Avalonia/Themes/Dark/RadioButton.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/RadioButton.axaml
@@ -10,17 +10,17 @@
-
+
-
+
-
+
@@ -40,7 +40,7 @@
-
+
diff --git a/src/Semi.Avalonia/Themes/Dark/Slider.axaml b/src/Semi.Avalonia/Themes/Dark/Slider.axaml
index a020cce..4f446cf 100644
--- a/src/Semi.Avalonia/Themes/Dark/Slider.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/Slider.axaml
@@ -8,7 +8,7 @@
-
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/SplitView.axaml b/src/Semi.Avalonia/Themes/Dark/SplitView.axaml
index aea9a99..0deac77 100644
--- a/src/Semi.Avalonia/Themes/Dark/SplitView.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/SplitView.axaml
@@ -1,4 +1,5 @@
-
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Dark/TextBox.axaml b/src/Semi.Avalonia/Themes/Dark/TextBox.axaml
index 31a0922..f9b5024 100644
--- a/src/Semi.Avalonia/Themes/Dark/TextBox.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/TextBox.axaml
@@ -9,9 +9,6 @@
-
-
-
diff --git a/src/Semi.Avalonia/Themes/Dark/ToggleSwitch.axaml b/src/Semi.Avalonia/Themes/Dark/ToggleSwitch.axaml
index e087b2f..f5d6888 100644
--- a/src/Semi.Avalonia/Themes/Dark/ToggleSwitch.axaml
+++ b/src/Semi.Avalonia/Themes/Dark/ToggleSwitch.axaml
@@ -10,4 +10,7 @@
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/AdornerLayer.axaml b/src/Semi.Avalonia/Themes/Light/AdornerLayer.axaml
index 9cd5cb5..5060345 100644
--- a/src/Semi.Avalonia/Themes/Light/AdornerLayer.axaml
+++ b/src/Semi.Avalonia/Themes/Light/AdornerLayer.axaml
@@ -1,3 +1,3 @@
-
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/Border.axaml b/src/Semi.Avalonia/Themes/Light/Border.axaml
index affef76..eb19ed2 100644
--- a/src/Semi.Avalonia/Themes/Light/Border.axaml
+++ b/src/Semi.Avalonia/Themes/Light/Border.axaml
@@ -1,5 +1,5 @@
+ 0 0 14 0 #1A000000
- 0 0 14 0 #1A000000
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/Button.axaml b/src/Semi.Avalonia/Themes/Light/Button.axaml
index ba9513c..adbc890 100644
--- a/src/Semi.Avalonia/Themes/Light/Button.axaml
+++ b/src/Semi.Avalonia/Themes/Light/Button.axaml
@@ -82,7 +82,7 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/ButtonSpinner.axaml b/src/Semi.Avalonia/Themes/Light/ButtonSpinner.axaml
index 5183887..c8a51fd 100644
--- a/src/Semi.Avalonia/Themes/Light/ButtonSpinner.axaml
+++ b/src/Semi.Avalonia/Themes/Light/ButtonSpinner.axaml
@@ -5,4 +5,4 @@
-
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/Calendar.axaml b/src/Semi.Avalonia/Themes/Light/Calendar.axaml
index 004048d..92a51ef 100644
--- a/src/Semi.Avalonia/Themes/Light/Calendar.axaml
+++ b/src/Semi.Avalonia/Themes/Light/Calendar.axaml
@@ -1,6 +1,4 @@
-
+
diff --git a/src/Semi.Avalonia/Themes/Light/CalendarDatePicker.axaml b/src/Semi.Avalonia/Themes/Light/CalendarDatePicker.axaml
index fccdc95..19a5b83 100644
--- a/src/Semi.Avalonia/Themes/Light/CalendarDatePicker.axaml
+++ b/src/Semi.Avalonia/Themes/Light/CalendarDatePicker.axaml
@@ -2,15 +2,15 @@
-
-
-
+
+
+
0 0 8 0 #1A000000
-
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/CheckBox.axaml b/src/Semi.Avalonia/Themes/Light/CheckBox.axaml
index 321e720..7b8f707 100644
--- a/src/Semi.Avalonia/Themes/Light/CheckBox.axaml
+++ b/src/Semi.Avalonia/Themes/Light/CheckBox.axaml
@@ -26,11 +26,11 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/ComboBox.axaml b/src/Semi.Avalonia/Themes/Light/ComboBox.axaml
index 46fe865..8fc128f 100644
--- a/src/Semi.Avalonia/Themes/Light/ComboBox.axaml
+++ b/src/Semi.Avalonia/Themes/Light/ComboBox.axaml
@@ -1,11 +1,13 @@
+
-
+
+
@@ -22,6 +24,7 @@
+
@@ -30,9 +33,11 @@
-
+
+
+
-
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/DataValidationErrors.axaml b/src/Semi.Avalonia/Themes/Light/DataValidationErrors.axaml
index 1116060..f84359d 100644
--- a/src/Semi.Avalonia/Themes/Light/DataValidationErrors.axaml
+++ b/src/Semi.Avalonia/Themes/Light/DataValidationErrors.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/DateTimePickerShared.axaml b/src/Semi.Avalonia/Themes/Light/DateTimePickerShared.axaml
index cd685fb..5c70384 100644
--- a/src/Semi.Avalonia/Themes/Light/DateTimePickerShared.axaml
+++ b/src/Semi.Avalonia/Themes/Light/DateTimePickerShared.axaml
@@ -15,13 +15,13 @@
-
+
-
+
diff --git a/src/Semi.Avalonia/Themes/Light/Label.axaml b/src/Semi.Avalonia/Themes/Light/Label.axaml
index 082d195..5826e49 100644
--- a/src/Semi.Avalonia/Themes/Light/Label.axaml
+++ b/src/Semi.Avalonia/Themes/Light/Label.axaml
@@ -33,7 +33,7 @@
-
+
@@ -71,7 +71,7 @@
-
+
@@ -89,7 +89,7 @@
-
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/ListBox.axaml b/src/Semi.Avalonia/Themes/Light/ListBox.axaml
index bec09ca..4305590 100644
--- a/src/Semi.Avalonia/Themes/Light/ListBox.axaml
+++ b/src/Semi.Avalonia/Themes/Light/ListBox.axaml
@@ -50,7 +50,7 @@
-
+
@@ -84,11 +84,11 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/NotificationCard.axaml b/src/Semi.Avalonia/Themes/Light/NotificationCard.axaml
index 2f0f914..6ed6ff2 100644
--- a/src/Semi.Avalonia/Themes/Light/NotificationCard.axaml
+++ b/src/Semi.Avalonia/Themes/Light/NotificationCard.axaml
@@ -1,10 +1,11 @@
-
- 0 0 8 0 #1A000000
+ 0 0 1 0 #4A000000, 0 4 14 0 #1A000000
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/RadioButton.axaml b/src/Semi.Avalonia/Themes/Light/RadioButton.axaml
index 935597a..87ef1d9 100644
--- a/src/Semi.Avalonia/Themes/Light/RadioButton.axaml
+++ b/src/Semi.Avalonia/Themes/Light/RadioButton.axaml
@@ -40,7 +40,7 @@
-
+
diff --git a/src/Semi.Avalonia/Themes/Light/Slider.axaml b/src/Semi.Avalonia/Themes/Light/Slider.axaml
index f949737..bb1d311 100644
--- a/src/Semi.Avalonia/Themes/Light/Slider.axaml
+++ b/src/Semi.Avalonia/Themes/Light/Slider.axaml
@@ -8,7 +8,7 @@
-
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Light/TextBox.axaml b/src/Semi.Avalonia/Themes/Light/TextBox.axaml
index dfcc1ed..467e67b 100644
--- a/src/Semi.Avalonia/Themes/Light/TextBox.axaml
+++ b/src/Semi.Avalonia/Themes/Light/TextBox.axaml
@@ -3,21 +3,18 @@
-
-
+
+
-
-
-
-
+
-
+
diff --git a/src/Semi.Avalonia/Themes/Light/ToggleSwitch.axaml b/src/Semi.Avalonia/Themes/Light/ToggleSwitch.axaml
index f1807ce..b86d9b1 100644
--- a/src/Semi.Avalonia/Themes/Light/ToggleSwitch.axaml
+++ b/src/Semi.Avalonia/Themes/Light/ToggleSwitch.axaml
@@ -10,4 +10,7 @@
+
+
+
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs b/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs
index 88268f3..23144a0 100644
--- a/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs
+++ b/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs
@@ -8,14 +8,16 @@ using Semi.Avalonia.Locale;
namespace Semi.Avalonia;
-public class SemiTheme: Styles
+public class SemiTheme : Styles
{
private static readonly Dictionary _localeToResource = new()
{
{ new CultureInfo("zh-cn"), new zh_cn() },
{ new CultureInfo("en-us"), new en_us() },
+ { new CultureInfo("ja-jp"), new ja_jp() },
+ { new CultureInfo("ru-ru"), new ru_ru() },
};
-
+
private readonly IServiceProvider? sp;
public SemiTheme(IServiceProvider? provider = null)
{
@@ -28,17 +30,17 @@ public class SemiTheme: Styles
{
get => _locale;
set
- {
+ {
_locale = value;
var resource = TryGetLocaleResource(value);
- if(resource is null) return;
+ if (resource is null) return;
foreach (var kv in resource)
{
this.Resources.Add(kv);
}
}
}
-
+
private static ResourceDictionary? TryGetLocaleResource(CultureInfo? locale)
{
if (locale is null)
diff --git a/src/Semi.Avalonia/Themes/Shared/AdornerLayer.axaml b/src/Semi.Avalonia/Themes/Shared/AdornerLayer.axaml
index b570b21..a5119bf 100644
--- a/src/Semi.Avalonia/Themes/Shared/AdornerLayer.axaml
+++ b/src/Semi.Avalonia/Themes/Shared/AdornerLayer.axaml
@@ -1,4 +1,3 @@
- 1
- 1
+ 2
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Shared/Menu.axaml b/src/Semi.Avalonia/Themes/Shared/Menu.axaml
index bafdddb..a8e9201 100644
--- a/src/Semi.Avalonia/Themes/Shared/Menu.axaml
+++ b/src/Semi.Avalonia/Themes/Shared/Menu.axaml
@@ -4,7 +4,7 @@
M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z
1
- 8
+ 0
6
16
100
diff --git a/src/Semi.Avalonia/Themes/Shared/NotificationCard.axaml b/src/Semi.Avalonia/Themes/Shared/NotificationCard.axaml
index 41c7039..9310982 100644
--- a/src/Semi.Avalonia/Themes/Shared/NotificationCard.axaml
+++ b/src/Semi.Avalonia/Themes/Shared/NotificationCard.axaml
@@ -1,9 +1,22 @@
- 320
+ 320
1
6
- M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z
- M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17.8831 9.82235L11.6854 17.4112C11.4029 17.7806 10.965 17.9981 10.5 18C10.035 18.0019 9.59533 17.788 9.30982 17.421L5.81604 13.4209C5.30744 12.767 5.42524 11.8246 6.07916 11.316C6.73308 10.8074 7.67549 10.9252 8.1841 11.5791L10.4838 14.0439L15.5 8C16.0032 7.34193 16.9446 7.21641 17.6027 7.71964C18.2608 8.22287 18.3863 9.16428 17.8831 9.82235Z
- M10.2268 2.3986L1.52616 19.0749C0.831449 20.4064 1.79747 22 3.29933 22H20.7007C22.2025 22 23.1686 20.4064 22.4739 19.0749L13.7732 2.3986C13.0254 0.965441 10.9746 0.965442 10.2268 2.3986ZM13.1415 14.0101C13.0603 14.5781 12.5739 15 12.0001 15C11.4263 15 10.9398 14.5781 10.8586 14.0101L10.2829 9.97992C10.1336 8.93495 10.9445 8.00002 12.0001 8.00002C13.0556 8.00002 13.8665 8.93495 13.7172 9.97992L13.1415 14.0101ZM13.5001 18.5C13.5001 19.3284 12.8285 20 12.0001 20C11.1716 20 10.5001 19.3284 10.5001 18.5C10.5001 17.6716 11.1716 17 12.0001 17C12.8285 17 13.5001 17.6716 13.5001 18.5Z
- M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19C12.8284 19 13.5 18.3284 13.5 17.5ZM12 5C10.9138 5 10.0507 5.91244 10.1109 6.99692L10.4168 12.5023C10.4635 13.3426 11.1584 14 12 14C12.8416 14 13.5365 13.3426 13.5832 12.5023L13.8891 6.99692C13.9493 5.91244 13.0862 5 12 5Z
+ 8
+ 20 16 12 16
+
+ 18
+ 18
+ 0 0 12 0
+ M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z
+ M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17.8831 9.82235L11.6854 17.4112C11.4029 17.7806 10.965 17.9981 10.5 18C10.035 18.0019 9.59533 17.788 9.30982 17.421L5.81604 13.4209C5.30744 12.767 5.42524 11.8246 6.07916 11.316C6.73308 10.8074 7.67549 10.9252 8.1841 11.5791L10.4838 14.0439L15.5 8C16.0032 7.34193 16.9446 7.21641 17.6027 7.71964C18.2608 8.22287 18.3863 9.16428 17.8831 9.82235Z
+ M10.2268 2.3986L1.52616 19.0749C0.831449 20.4064 1.79747 22 3.29933 22H20.7007C22.2025 22 23.1686 20.4064 22.4739 19.0749L13.7732 2.3986C13.0254 0.965441 10.9746 0.965442 10.2268 2.3986ZM13.1415 14.0101C13.0603 14.5781 12.5739 15 12.0001 15C11.4263 15 10.9398 14.5781 10.8586 14.0101L10.2829 9.97992C10.1336 8.93495 10.9445 8.00002 12.0001 8.00002C13.0556 8.00002 13.8665 8.93495 13.7172 9.97992L13.1415 14.0101ZM13.5001 18.5C13.5001 19.3284 12.8285 20 12.0001 20C11.1716 20 10.5001 19.3284 10.5001 18.5C10.5001 17.6716 11.1716 17 12.0001 17C12.8285 17 13.5001 17.6716 13.5001 18.5Z
+ M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19C12.8284 19 13.5 18.3284 13.5 17.5ZM12 5C10.9138 5 10.0507 5.91244 10.1109 6.99692L10.4168 12.5023C10.4635 13.3426 11.1584 14 12 14C12.8416 14 13.5365 13.3426 13.5832 12.5023L13.8891 6.99692C13.9493 5.91244 13.0862 5 12 5Z
+
+ 4
+
+ 16
+ 600
+ 14
+ 400
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Shared/TextBox.axaml b/src/Semi.Avalonia/Themes/Shared/TextBox.axaml
index 9df2ab2..d0b3591 100644
--- a/src/Semi.Avalonia/Themes/Shared/TextBox.axaml
+++ b/src/Semi.Avalonia/Themes/Shared/TextBox.axaml
@@ -14,6 +14,6 @@
12 5
90
- M12 4C5 4 1 10 1 12C1 14 5 20 12 20C19 20 23 14 23 12C23 10 19 4 12 4ZM17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12ZM12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z
- M2.02949 4.67856C2.7593 4.28654 3.66871 4.56038 4.06073 5.29018C6.21313 9.29726 8.83179 11.5 12.0001 11.5C15.1685 11.5 17.7871 9.29726 19.9395 5.29018C20.3315 4.56038 21.241 4.28655 21.9708 4.67856C22.7006 5.07058 22.9744 5.97999 22.5824 6.7098C21.9049 7.97104 21.1385 9.15419 20.2743 10.199L23.2001 14.1C23.6971 14.7627 23.5628 15.7029 22.9001 16.2C22.2373 16.697 21.2971 16.5627 20.8001 15.9L18.1186 12.3246C17.448 12.8501 16.7322 13.2957 15.9687 13.6441L17.4046 17.4733C17.6955 18.249 17.3025 19.1136 16.5268 19.4045C15.7511 19.6954 14.8865 19.3024 14.5956 18.5267L13.0956 14.5267C13.0852 14.4988 13.0756 14.4709 13.0669 14.4428C12.7193 14.4806 12.3638 14.5 12.0001 14.5C11.6365 14.5 11.281 14.4806 10.9333 14.4428C10.9246 14.4709 10.9151 14.4988 10.9046 14.5267L9.40463 18.5267C9.11375 19.3024 8.24913 19.6954 7.47345 19.4045C6.69777 19.1136 6.30476 18.249 6.59564 17.4733L8.03159 13.6441C7.26806 13.2957 6.55223 12.8501 5.88163 12.3246L3.20009 15.9C2.70303 16.5627 1.76283 16.697 1.10009 16.2C0.437347 15.7029 0.303032 14.7627 0.800088 14.1L3.72589 10.1989C2.86177 9.15415 2.09533 7.97101 1.41787 6.70979C1.02585 5.97999 1.29969 5.07057 2.02949 4.67856Z
+ M21.7071 3.70711C22.0976 3.31658 22.0976 2.68342 21.7071 2.29289C21.3166 1.90237 20.6834 1.90237 20.2929 2.29289L17.3135 5.27233C15.8114 4.50566 14.0321 4 12 4C5 4 1 10 1 12C1 13.1757 2.38219 15.7335 4.94345 17.6423L2.29289 20.2929C1.90237 20.6834 1.90237 21.3166 2.29289 21.7071C2.68342 22.0976 3.31658 22.0976 3.70711 21.7071L21.7071 3.70711ZM7.8284 14.7574L9.29237 13.2934C9.10495 12.9018 9 12.4631 9 12C9 10.3431 10.3431 9 12 9C12.4631 9 12.9018 9.10495 13.2934 9.29237L14.7574 7.8284C13.967 7.30488 13.0191 7 12 7C9.23858 7 7 9.23858 7 12C7 13.0191 7.30488 13.967 7.8284 14.7574Z M12 20C10.7789 20 9.64914 19.8174 8.61594 19.5054L11.1871 16.9342C11.4516 16.9775 11.7232 17 12 17C14.7614 17 17 14.7614 17 12C17 11.7232 16.9775 11.4516 16.9342 11.1871L20.5032 7.61808C22.1342 9.27317 23 11.0695 23 12C23 14 19 20 12 20Z
+ M12 4C5 4 1 10 1 12C1 14 5 20 12 20C19 20 23 14 23 12C23 10 19 4 12 4ZM17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12ZM12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z
\ No newline at end of file
diff --git a/src/Semi.Avalonia/Themes/Shared/ToggleSwitch.axaml b/src/Semi.Avalonia/Themes/Shared/ToggleSwitch.axaml
index 16a1e78..eaa89b4 100644
--- a/src/Semi.Avalonia/Themes/Shared/ToggleSwitch.axaml
+++ b/src/Semi.Avalonia/Themes/Shared/ToggleSwitch.axaml
@@ -11,10 +11,14 @@
2 0 0 0
1 0 0 0
3 0 0 0
+ 1
+ 3
12
14
8 4
8 4
+
+ 14
\ No newline at end of file