mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-14 13:16:36 +08:00
Compare commits
44 Commits
v11.1.0-be
...
v11.1.0-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cc40c09c9 | ||
|
|
0d8ea070cc | ||
|
|
d959ef234c | ||
|
|
8ebc6878b1 | ||
|
|
9d2b2d37e2 | ||
|
|
8982e610e2 | ||
|
|
31e2c009fb | ||
|
|
9259f06f57 | ||
|
|
724a528b16 | ||
|
|
09d23f8eaa | ||
|
|
d3c909a83c | ||
|
|
b505445b77 | ||
|
|
74c1b2f2ee | ||
|
|
8afe3a87bd | ||
|
|
b5f4bacece | ||
|
|
c46e6b9cf9 | ||
|
|
ccc25b4801 | ||
|
|
e6541b4741 | ||
|
|
c4f5754129 | ||
|
|
d7fce5c180 | ||
|
|
4f685c712a | ||
|
|
1378219b7a | ||
|
|
0979141f54 | ||
|
|
6a94e403c9 | ||
|
|
2da1ecf5a0 | ||
|
|
915c45c21f | ||
|
|
db137ef718 | ||
|
|
f66edd5782 | ||
|
|
5b48f77dfb | ||
|
|
a225feeb0d | ||
|
|
99ddfcc952 | ||
|
|
0daa884003 | ||
|
|
93df1abf4a | ||
|
|
942229acdc | ||
|
|
139c0b926c | ||
|
|
694dd863fa | ||
|
|
b378cdf880 | ||
|
|
57646f5390 | ||
|
|
9e5d5298c4 | ||
|
|
0fb1e585db | ||
|
|
d5dce72a34 | ||
|
|
b1a29c67a9 | ||
|
|
471106f825 | ||
|
|
ec070d2f67 |
19
.github/workflows/deploy.yml
vendored
19
.github/workflows/deploy.yml
vendored
@@ -2,7 +2,7 @@ name: Deploy to GitHub Pages
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
PROJECT_PATH: demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj
|
PROJECT_PATH: demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj
|
||||||
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net7.0/browser-wasm/AppBundle
|
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net8.0-browser/publish/wwwroot
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "action/deploy" ]
|
branches: [ "action/deploy" ]
|
||||||
@@ -16,19 +16,16 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Setup .NET 7
|
- name: Setup .NET 8
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 7.0.405
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
- name: Install wasm-tools
|
- name: Install wasm-tools
|
||||||
run: dotnet workload install wasm-tools wasm-tools-net7
|
run: dotnet workload install wasm-tools
|
||||||
|
|
||||||
- name: Install DotNetCompress
|
|
||||||
run: dotnet tool install --global DotNetCompress --version 3.0.0 --no-cache
|
|
||||||
|
|
||||||
- name: Publish .NET Project
|
- name: Publish .NET Project
|
||||||
run: dotnet publish $PROJECT_PATH -c Release -o release --nologo
|
run: dotnet publish $PROJECT_PATH -c Release --nologo
|
||||||
|
|
||||||
- name: Change base-tag in index.html
|
- name: Change base-tag in index.html
|
||||||
run: sed -i 's/<base href="\/" \/>/<base href="\/Semi.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html
|
run: sed -i 's/<base href="\/" \/>/<base href="\/Semi.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html
|
||||||
@@ -36,12 +33,6 @@ jobs:
|
|||||||
- name: copy index.html to 404.html
|
- name: copy index.html to 404.html
|
||||||
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
|
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
|
||||||
|
|
||||||
- name: Compress Output using Brotli
|
|
||||||
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format br --threads 4
|
|
||||||
|
|
||||||
- name: Compress Output using GZip
|
|
||||||
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4
|
|
||||||
|
|
||||||
- name: Add .nojekyll file
|
- name: Add .nojekyll file
|
||||||
run: touch $OUTPUT_PATH/.nojekyll
|
run: touch $OUTPUT_PATH/.nojekyll
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ jobs:
|
|||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net7.0-android --no-restore
|
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v4.3.1
|
uses: actions/upload-artifact@v4.3.1
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="SC-Single" type="DotNetFolderPublish" factoryName="Publish to folder">
|
<configuration default="false" name="SC-Single" type="DotNetFolderPublish" factoryName="Publish to folder">
|
||||||
<riderPublish configuration="Release" include_native_libs_for_self_extract="true" platform="Any CPU" produce_single_file="true" runtime="win-x64" self_contained="true" target_folder="$PROJECT_DIR$/demo/Semi.Avalonia.Demo.Desktop/bin/Release/net7.0/win-x64/publish" target_framework="net7.0" uuid_high="3088527218258560748" uuid_low="-8649338673481336678" />
|
<riderPublish configuration="Release" include_native_libs_for_self_extract="true" platform="Any CPU" produce_single_file="true" runtime="win-x64" self_contained="true" target_folder="$PROJECT_DIR$/demo/Semi.Avalonia.Demo.Desktop/bin/Release/net8.0/win-x64/publish" target_framework="net8.0" uuid_high="3088527218258560748" uuid_low="-8649338673481336678" />
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
13
README.md
13
README.md
@@ -16,7 +16,7 @@ If you are looking for more customized controls, Please try [Ursa](https://githu
|
|||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia --version 11.0.7
|
dotnet add package Semi.Avalonia
|
||||||
```
|
```
|
||||||
|
|
||||||
Include Semi Design Styles in application:
|
Include Semi Design Styles in application:
|
||||||
@@ -32,9 +32,9 @@ That's all.
|
|||||||
ColorPicker, DataGrid and TreeDataGrid are distributed in separated packages. Please install if you need.
|
ColorPicker, DataGrid and TreeDataGrid are distributed in separated packages. Please install if you need.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia.ColorPicker --version 11.0.7
|
dotnet add package Semi.Avalonia.ColorPicker
|
||||||
dotnet add package Semi.Avalonia.DataGrid --version 11.0.7
|
dotnet add package Semi.Avalonia.DataGrid
|
||||||
dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.7
|
dotnet add package Semi.Avalonia.TreeDataGrid
|
||||||
```
|
```
|
||||||
|
|
||||||
```xaml
|
```xaml
|
||||||
@@ -90,13 +90,10 @@ We offer limited free community support for Semi Avalonia and Ursa. If you have
|
|||||||
|
|
||||||
| Semi Design Version | Avalonia Version |
|
| Semi Design Version | Avalonia Version |
|
||||||
|:--------------------|:-----------------|
|
|:--------------------|:-----------------|
|
||||||
|
| 11.1.0-rc | >=11.1.0-rc |
|
||||||
| 11.0.7 | >=11.0.7 |
|
| 11.0.7 | >=11.0.7 |
|
||||||
| 11.0.1 | <=11.0.6 |
|
| 11.0.1 | <=11.0.6 |
|
||||||
|
|
||||||
## TODO
|
|
||||||
|
|
||||||
* FocusAdorner
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
[Semi Design](https://semi.design/)
|
[Semi Design](https://semi.design/)
|
||||||
|
|||||||
13
README_CN.md
13
README_CN.md
@@ -16,7 +16,7 @@ Avalonia UI 控件主题,灵感来自 Semi Design
|
|||||||
### 安装
|
### 安装
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia --version 11.0.7
|
dotnet add package Semi.Avalonia
|
||||||
```
|
```
|
||||||
|
|
||||||
在样式中引用 Semi 主题:
|
在样式中引用 Semi 主题:
|
||||||
@@ -32,9 +32,9 @@ dotnet add package Semi.Avalonia --version 11.0.7
|
|||||||
ColorPicker, DataGrid 和 TreeDataGrid 的样式单独分发,如果需要请安装并引用。
|
ColorPicker, DataGrid 和 TreeDataGrid 的样式单独分发,如果需要请安装并引用。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia.ColorPicker --version 11.0.7
|
dotnet add package Semi.Avalonia.ColorPicker
|
||||||
dotnet add package Semi.Avalonia.DataGrid --version 11.0.7
|
dotnet add package Semi.Avalonia.DataGrid
|
||||||
dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.7
|
dotnet add package Semi.Avalonia.TreeDataGrid
|
||||||
```
|
```
|
||||||
|
|
||||||
```xaml
|
```xaml
|
||||||
@@ -92,13 +92,10 @@ rd.xml 文件的内容如下:
|
|||||||
|
|
||||||
| Semi Design Version | Avalonia Version |
|
| Semi Design Version | Avalonia Version |
|
||||||
|:--------------------|:-----------------|
|
|:--------------------|:-----------------|
|
||||||
|
| 11.1.0-rc | >=11.1.0-rc |
|
||||||
| 11.0.7 | >=11.0.7 |
|
| 11.0.7 | >=11.0.7 |
|
||||||
| 11.0.1 | <=11.0.6 |
|
| 11.0.1 | <=11.0.6 |
|
||||||
|
|
||||||
## 代办事项
|
|
||||||
|
|
||||||
* FocusAdorner
|
|
||||||
|
|
||||||
## 致谢
|
## 致谢
|
||||||
|
|
||||||
[Semi Design](https://semi.design/)
|
[Semi Design](https://semi.design/)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AvaloniaVersion>11.1.0-beta2</AvaloniaVersion>
|
<AvaloniaVersion>11.1.0-rc2</AvaloniaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0-android</TargetFramework>
|
<TargetFramework>net8.0-android</TargetFramework>
|
||||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||||
<ApplicationId>com.irihitech.Semi.Avalonia</ApplicationId>
|
<ApplicationId>com.irihitech.Semi.Avalonia</ApplicationId>
|
||||||
<ApplicationVersion>1</ApplicationVersion>
|
<ApplicationVersion>1</ApplicationVersion>
|
||||||
|
|||||||
3
demo/Semi.Avalonia.Demo.Desktop/Roots.xml
Normal file
3
demo/Semi.Avalonia.Demo.Desktop/Roots.xml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<linker>
|
||||||
|
<assembly fullname="Semi.Avalonia.Demo" preserve="All"/>
|
||||||
|
</linker>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<!-- Uncomment below to enable Native AOT compilation-->
|
<!-- Uncomment below to enable Native AOT compilation-->
|
||||||
@@ -11,12 +11,17 @@
|
|||||||
-->
|
-->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
<IsTrimmable>true</IsTrimmable>
|
||||||
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<RdXmlFile Include="rd.xml" />
|
<TrimmerRootDescriptor Include="Roots.xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Directives>
|
|
||||||
<!--
|
|
||||||
This file is part of RdXmlLibrary project.
|
|
||||||
Visit https://github.com/kant2002/rdxmllibrary for latest version.
|
|
||||||
If you have modifications specific to this Nuget package,
|
|
||||||
please contribute back.
|
|
||||||
-->
|
|
||||||
<Application>
|
|
||||||
<Assembly Name="Avalonia.Markup.Xaml" Dynamic="Required All"/>
|
|
||||||
<Assembly Name="Semi.Avalonia" Dynamic="Required All"/>
|
|
||||||
<Assembly Name="Semi.Avalonia.DataGrid" Dynamic="Required All"/>
|
|
||||||
<Assembly Name="Semi.Avalonia.ColorPicker" Dynamic="Required All"/>
|
|
||||||
<Assembly Name="Semi.Avalonia.Demo" Dynamic="Required All"/>
|
|
||||||
</Application>
|
|
||||||
</Directives>
|
|
||||||
16
demo/Semi.Avalonia.Demo.Web/AvaloniaAppBuilderExtensions.cs
Normal file
16
demo/Semi.Avalonia.Demo.Web/AvaloniaAppBuilderExtensions.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Media;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Demo.Web;
|
||||||
|
|
||||||
|
public static class AvaloniaAppBuilderExtensions
|
||||||
|
{
|
||||||
|
private static string DefaultFontFamily => "avares://Semi.Avalonia.Demo.Web/Assets#Source Han Sans CN";
|
||||||
|
|
||||||
|
public static AppBuilder WithSourceHanSansCNFont(this AppBuilder builder) =>
|
||||||
|
builder.With(new FontManagerOptions
|
||||||
|
{
|
||||||
|
DefaultFamilyName = DefaultFontFamily,
|
||||||
|
FontFallbacks = new[] { new FontFallback { FontFamily = new FontFamily(DefaultFontFamily) } }
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ namespace Semi.Avalonia.Demo.Web;
|
|||||||
internal sealed partial class Program
|
internal sealed partial class Program
|
||||||
{
|
{
|
||||||
private static Task Main(string[] args) => BuildAvaloniaApp()
|
private static Task Main(string[] args) => BuildAvaloniaApp()
|
||||||
|
.WithSourceHanSansCNFont()
|
||||||
.StartBrowserAppAsync("out");
|
.StartBrowserAppAsync("out");
|
||||||
|
|
||||||
public static AppBuilder BuildAvaloniaApp()
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
|
|||||||
@@ -1,21 +1,18 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk.WebAssembly">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0-browser</TargetFramework>
|
<TargetFramework>net8.0-browser</TargetFramework>
|
||||||
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
|
|
||||||
<WasmMainJSPath>wwwroot\main.js</WasmMainJSPath>
|
|
||||||
<WasmRuntimeAssetsLocation>./_framework</WasmRuntimeAssetsLocation>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<WasmExtraFilesToDeploy Include="wwwroot\**"/>
|
<AvaloniaResource Include="Assets\**"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)" />
|
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj" />
|
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -4,10 +4,9 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:semi="https://irihi.tech/semi">
|
xmlns:semi="https://irihi.tech/semi">
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
<!-- You can still reference in old way.
|
<!-- You can still reference in old way. -->
|
||||||
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
|
<!-- <StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" /> -->
|
||||||
-->
|
<semi:SemiTheme Locale="zh-CN" />
|
||||||
<semi:SemiTheme Locale="zh-CN"/>
|
|
||||||
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
|
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
|
||||||
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
|
|||||||
@@ -44,11 +44,6 @@
|
|||||||
<Button Classes="Danger">Danger</Button>
|
<Button Classes="Danger">Danger</Button>
|
||||||
<Button Classes="Danger" IsEnabled="False">Disabled</Button>
|
<Button Classes="Danger" IsEnabled="False">Disabled</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
|
||||||
<Button Classes="Primary Small">Small</Button>
|
|
||||||
<Button Classes="Primary">Default</Button>
|
|
||||||
<Button Classes="Primary Large">Large</Button>
|
|
||||||
</StackPanel>
|
|
||||||
<TextBlock>Solid</TextBlock>
|
<TextBlock>Solid</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
|
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
|
||||||
@@ -64,6 +59,16 @@
|
|||||||
Disabled
|
Disabled
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<TextBlock>Outline</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
|
<Button Classes="Primary" Theme="{DynamicResource OutlineButton}">Primary</Button>
|
||||||
|
<Button Classes="Secondary" Theme="{DynamicResource OutlineButton}">Secondary</Button>
|
||||||
|
<Button Classes="Tertiary" Theme="{DynamicResource OutlineButton}">Tertiary</Button>
|
||||||
|
<Button Classes="Success" Theme="{DynamicResource OutlineButton}">Success</Button>
|
||||||
|
<Button Classes="Warning" Theme="{DynamicResource OutlineButton}">Warning</Button>
|
||||||
|
<Button Classes="Danger" Theme="{DynamicResource OutlineButton}">Danger</Button>
|
||||||
|
<Button Classes="Danger" Theme="{DynamicResource OutlineButton}" IsEnabled="False">Disabled</Button>
|
||||||
|
</StackPanel>
|
||||||
<TextBlock>Borderless</TextBlock>
|
<TextBlock>Borderless</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
|
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
|
||||||
@@ -79,6 +84,19 @@
|
|||||||
Disabled
|
Disabled
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<TextBlock>Disabled</TextBlock>
|
||||||
|
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
|
||||||
|
<Button IsEnabled="False">Light</Button>
|
||||||
|
<Button IsEnabled="False" Theme="{DynamicResource SolidButton}">Solid</Button>
|
||||||
|
<Button IsEnabled="False" Theme="{DynamicResource OutlineButton}">Outline</Button>
|
||||||
|
<Button IsEnabled="False" Theme="{DynamicResource BorderlessButton}">Borderless</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock>Size Classes</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
|
<Button Classes="Primary Small">Small</Button>
|
||||||
|
<Button Classes="Primary">Default</Button>
|
||||||
|
<Button Classes="Primary Large">Large</Button>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<TextBlock>DropDownButton</TextBlock>
|
<TextBlock>DropDownButton</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
@@ -96,9 +114,11 @@
|
|||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<DropDownButton Content="Default" Classes="Success"/>
|
<DropDownButton Content="Default" Classes="Success"/>
|
||||||
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success"/>
|
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success"/>
|
||||||
|
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success"/>
|
||||||
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success"/>
|
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success"/>
|
||||||
<DropDownButton Content="Default" Classes="Success" IsEnabled="False"/>
|
<DropDownButton Content="Default" Classes="Success" IsEnabled="False"/>
|
||||||
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success" IsEnabled="False"/>
|
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success" IsEnabled="False"/>
|
||||||
|
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success" IsEnabled="False"/>
|
||||||
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" IsEnabled="False"/>
|
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" IsEnabled="False"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
@@ -119,11 +139,13 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<SplitButton Content="Default" Classes="Success" />
|
<SplitButton Content="Default" Classes="Success" />
|
||||||
<SplitButton Theme="{DynamicResource SolidSplitButton}" Content="Solid" Classes="Success" />
|
<SplitButton Content="Solid" Theme="{DynamicResource SolidSplitButton}" Classes="Success" />
|
||||||
<SplitButton Theme="{DynamicResource BorderlessSplitButton}" Content="Borderless" Classes="Success" />
|
<SplitButton Content="Outline" Theme="{DynamicResource OutlineSplitButton}" Classes="Success" />
|
||||||
|
<SplitButton Content="Borderless" Theme="{DynamicResource BorderlessSplitButton}" Classes="Success" />
|
||||||
<SplitButton Content="Default" Classes="Success" IsEnabled="False" />
|
<SplitButton Content="Default" Classes="Success" IsEnabled="False" />
|
||||||
<SplitButton Theme="{DynamicResource SolidSplitButton}" Content="Solid" Classes="Success" IsEnabled="False" />
|
<SplitButton Content="Solid" Theme="{DynamicResource SolidSplitButton}" Classes="Success" IsEnabled="False" />
|
||||||
<SplitButton Theme="{DynamicResource BorderlessSplitButton}" Content="Borderless" Classes="Success" IsEnabled="False" />
|
<SplitButton Content="Outline" Theme="{DynamicResource OutlineSplitButton}" Classes="Success" IsEnabled="False" />
|
||||||
|
<SplitButton Content="Borderless" Theme="{DynamicResource BorderlessSplitButton}" Classes="Success" IsEnabled="False" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<SplitButton Classes="Small" Content="Small" />
|
<SplitButton Classes="Small" Content="Small" />
|
||||||
@@ -141,6 +163,12 @@
|
|||||||
<ToggleSplitButton Classes="Danger" Content="Danger" />
|
<ToggleSplitButton Classes="Danger" Content="Danger" />
|
||||||
<ToggleSplitButton Classes="Danger" Content="Disabled" IsEnabled="False" />
|
<ToggleSplitButton Classes="Danger" Content="Disabled" IsEnabled="False" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
|
<ToggleSplitButton Content="Default" Classes="Success" />
|
||||||
|
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" />
|
||||||
|
<ToggleSplitButton Content="Default" Classes="Success" IsEnabled="False" />
|
||||||
|
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<ToggleSplitButton Classes="Small" Content="Small" />
|
<ToggleSplitButton Classes="Small" Content="Small" />
|
||||||
<ToggleSplitButton Content="Default" />
|
<ToggleSplitButton Content="Default" />
|
||||||
|
|||||||
@@ -78,8 +78,8 @@
|
|||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}">
|
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}">
|
||||||
<ListBoxItem Classes="Large" IsSelected="True">Small 1</ListBoxItem>
|
<ListBoxItem Classes="Large" IsSelected="True">Large 1</ListBoxItem>
|
||||||
<ListBoxItem Classes="Large">Small 2</ListBoxItem>
|
<ListBoxItem Classes="Large">Large 2</ListBoxItem>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
</Border>
|
</Border>
|
||||||
<Border
|
<Border
|
||||||
@@ -87,8 +87,8 @@
|
|||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Theme="{StaticResource RadioButtonGroupBorder}">
|
Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}" IsEnabled="False">
|
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}" IsEnabled="False">
|
||||||
<ListBoxItem Classes="Large" IsSelected="True">Small 1</ListBoxItem>
|
<ListBoxItem Classes="Large" IsSelected="True">Large 1</ListBoxItem>
|
||||||
<ListBoxItem Classes="Large">Small 2</ListBoxItem>
|
<ListBoxItem Classes="Large">Large 2</ListBoxItem>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
Value="60" />
|
Value="60" />
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
Width="200"
|
Width="200"
|
||||||
Classes="Error"
|
Classes="Danger"
|
||||||
Maximum="100"
|
Maximum="100"
|
||||||
Minimum="0"
|
Minimum="0"
|
||||||
ShowProgressText="True"
|
ShowProgressText="True"
|
||||||
|
|||||||
@@ -33,6 +33,21 @@
|
|||||||
Disabled
|
Disabled
|
||||||
</RepeatButton>
|
</RepeatButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<TextBlock>Outline</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
|
<RepeatButton Classes="Primary" Theme="{DynamicResource OutlineRepeatButton}">Primary</RepeatButton>
|
||||||
|
<RepeatButton Classes="Secondary" Theme="{DynamicResource OutlineRepeatButton}">Secondary</RepeatButton>
|
||||||
|
<RepeatButton Classes="Tertiary" Theme="{DynamicResource OutlineRepeatButton}">Tertiary</RepeatButton>
|
||||||
|
<RepeatButton Classes="Success" Theme="{DynamicResource OutlineRepeatButton}">Success</RepeatButton>
|
||||||
|
<RepeatButton Classes="Warning" Theme="{DynamicResource OutlineRepeatButton}">Warning</RepeatButton>
|
||||||
|
<RepeatButton Classes="Danger" Theme="{DynamicResource OutlineRepeatButton}">Danger</RepeatButton>
|
||||||
|
<RepeatButton
|
||||||
|
Classes="Danger"
|
||||||
|
IsEnabled="False"
|
||||||
|
Theme="{DynamicResource OutlineRepeatButton}">
|
||||||
|
Disabled
|
||||||
|
</RepeatButton>
|
||||||
|
</StackPanel>
|
||||||
<TextBlock>Borderless</TextBlock>
|
<TextBlock>Borderless</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<RepeatButton Classes="Primary" Theme="{DynamicResource BorderlessRepeatButton}">Primary</RepeatButton>
|
<RepeatButton Classes="Primary" Theme="{DynamicResource BorderlessRepeatButton}">Primary</RepeatButton>
|
||||||
@@ -48,7 +63,15 @@
|
|||||||
Disabled
|
Disabled
|
||||||
</RepeatButton>
|
</RepeatButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<TextBlock>Disabled</TextBlock>
|
||||||
|
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
|
||||||
|
<Button IsEnabled="False">Light</Button>
|
||||||
|
<Button IsEnabled="False" Theme="{DynamicResource SolidButton}">Solid</Button>
|
||||||
|
<Button IsEnabled="False" Theme="{DynamicResource OutlineButton}">Outline</Button>
|
||||||
|
<Button IsEnabled="False" Theme="{DynamicResource BorderlessButton}">Borderless</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock>Size Classes</TextBlock>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<RepeatButton Classes="Small">Small</RepeatButton>
|
<RepeatButton Classes="Small">Small</RepeatButton>
|
||||||
<RepeatButton>Default</RepeatButton>
|
<RepeatButton>Default</RepeatButton>
|
||||||
<RepeatButton Classes="Large">Large</RepeatButton>
|
<RepeatButton Classes="Large">Large</RepeatButton>
|
||||||
|
|||||||
@@ -82,7 +82,14 @@
|
|||||||
Disabled
|
Disabled
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal">
|
<TextBlock Text="Toggle Button Disabled State" />
|
||||||
|
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
|
||||||
|
<ToggleButton IsThreeState="True" IsEnabled="False">Default</ToggleButton>
|
||||||
|
<ToggleButton IsThreeState="True" IsEnabled="False" IsChecked="True">Checked</ToggleButton>
|
||||||
|
<ToggleButton IsThreeState="True" IsEnabled="False" IsChecked="{x:Null}">Indeterminate</ToggleButton>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock Text="Toggle Button Size" />
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<ToggleButton Classes="Small" IsThreeState="True">Small</ToggleButton>
|
<ToggleButton Classes="Small" IsThreeState="True">Small</ToggleButton>
|
||||||
<ToggleButton IsThreeState="True">Default</ToggleButton>
|
<ToggleButton IsThreeState="True">Default</ToggleButton>
|
||||||
<ToggleButton Classes="Large" IsThreeState="True">Large</ToggleButton>
|
<ToggleButton Classes="Large" IsThreeState="True">Large</ToggleButton>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="8" Margin="20">
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
Content="Content"
|
Content="Content"
|
||||||
OffContent="OffContent"
|
OffContent="OffContent"
|
||||||
@@ -24,11 +24,19 @@
|
|||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
OffContent="OffContent"
|
OffContent="OffContent"
|
||||||
OnContent="OnContent" />
|
OnContent="OnContent" />
|
||||||
<ToggleSwitch
|
<StackPanel Orientation="Horizontal">
|
||||||
Theme="{DynamicResource SimpleToggleSwitch}"
|
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small" />
|
||||||
Content="Content"
|
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small" IsChecked="True"/>
|
||||||
OffContent="OffContent"
|
</StackPanel>
|
||||||
OnContent="OnContent" />
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" />
|
||||||
|
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" IsChecked="True" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Large" />
|
||||||
|
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Large" IsChecked="True"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<ToggleSwitch Theme="{DynamicResource ButtonToggleSwitch}">
|
<ToggleSwitch Theme="{DynamicResource ButtonToggleSwitch}">
|
||||||
<ToggleSwitch.OnContent>
|
<ToggleSwitch.OnContent>
|
||||||
<PathIcon
|
<PathIcon
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
<linker>
|
|
||||||
<!-- Can be removed if CompiledBinding and no reflection are used -->
|
|
||||||
<assembly fullname="Semi.Avalonia.Demo" preserve="All" />
|
|
||||||
<assembly fullname="Avalonia.Themes.Fluent" preserve="All" />
|
|
||||||
</linker>
|
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AvaloniaResource Include="Assets\**" />
|
<AvaloniaResource Include="Assets\**" />
|
||||||
<TrimmerRootDescriptor Include="Roots.xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ public class PaletteDemoViewModel: ObservableObject
|
|||||||
|
|
||||||
public PaletteDemoViewModel()
|
public PaletteDemoViewModel()
|
||||||
{
|
{
|
||||||
_lightResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Light/Palette.axaml")) as ResourceDictionary;
|
_lightResourceDictionary = new Light.Palette();
|
||||||
_darkResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Dark/Palette.axaml")) as ResourceDictionary;
|
_darkResourceDictionary = new Dark.Palette();
|
||||||
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
|
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorPrimary", "Primary"),
|
new ("SemiColorPrimary", "Primary"),
|
||||||
new ("SemiColorPrimaryPointerover", "Primary Pointerover"),
|
new ("SemiColorPrimaryPointerover", "Primary Pointerover"),
|
||||||
new ("SemiColorPrimaryPressed", "Primary Pressed"),
|
new ("SemiColorPrimaryActive", "Primary Active"),
|
||||||
new ("SemiColorPrimaryDisabled", "Primary Disabled"),
|
new ("SemiColorPrimaryDisabled", "Primary Disabled"),
|
||||||
new ("SemiColorPrimaryLight", "Primary Light"),
|
new ("SemiColorPrimaryLight", "Primary Light"),
|
||||||
new ("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"),
|
new ("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"),
|
||||||
@@ -262,7 +262,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorSecondary", "Secondary"),
|
new ("SemiColorSecondary", "Secondary"),
|
||||||
new ("SemiColorSecondaryPointerover", "Secondary Pointerover"),
|
new ("SemiColorSecondaryPointerover", "Secondary Pointerover"),
|
||||||
new ("SemiColorSecondaryPressed", "Secondary Pressed"),
|
new ("SemiColorSecondaryActive", "Secondary Active"),
|
||||||
new ("SemiColorSecondaryDisabled", "Secondary Disabled"),
|
new ("SemiColorSecondaryDisabled", "Secondary Disabled"),
|
||||||
new ("SemiColorSecondaryLight", "Secondary Light"),
|
new ("SemiColorSecondaryLight", "Secondary Light"),
|
||||||
new ("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"),
|
new ("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"),
|
||||||
@@ -273,7 +273,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorTertiary", "Tertiary"),
|
new ("SemiColorTertiary", "Tertiary"),
|
||||||
new ("SemiColorTertiaryPointerover", "Tertiary Pointerover"),
|
new ("SemiColorTertiaryPointerover", "Tertiary Pointerover"),
|
||||||
new ("SemiColorTertiaryPressed", "Tertiary Pressed"),
|
new ("SemiColorTertiaryActive", "Tertiary Active"),
|
||||||
new ("SemiColorTertiaryLight", "Tertiary Light"),
|
new ("SemiColorTertiaryLight", "Tertiary Light"),
|
||||||
new ("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"),
|
new ("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"),
|
||||||
new ("SemiColorTertiaryLightActive", "Tertiary Light Active"),
|
new ("SemiColorTertiaryLightActive", "Tertiary Light Active"),
|
||||||
@@ -283,7 +283,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorInformation", "Information"),
|
new ("SemiColorInformation", "Information"),
|
||||||
new ("SemiColorInformationPointerover", "Information Pointerover"),
|
new ("SemiColorInformationPointerover", "Information Pointerover"),
|
||||||
new ("SemiColorInformationPressed", "Information Pressed"),
|
new ("SemiColorInformationActive", "Information Active"),
|
||||||
new ("SemiColorInformationDisabled", "Information Disabled"),
|
new ("SemiColorInformationDisabled", "Information Disabled"),
|
||||||
new ("SemiColorInformationLight", "Information Light"),
|
new ("SemiColorInformationLight", "Information Light"),
|
||||||
new ("SemiColorInformationLightPointerover", "Information Light Pointerover"),
|
new ("SemiColorInformationLightPointerover", "Information Light Pointerover"),
|
||||||
@@ -294,7 +294,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorSuccess", "Success"),
|
new ("SemiColorSuccess", "Success"),
|
||||||
new ("SemiColorSuccessPointerover", "Success Pointerover"),
|
new ("SemiColorSuccessPointerover", "Success Pointerover"),
|
||||||
new ("SemiColorSuccessPressed", "Success Pressed"),
|
new ("SemiColorSuccessActive", "Success Active"),
|
||||||
new ("SemiColorSuccessDisabled", "Success Disabled"),
|
new ("SemiColorSuccessDisabled", "Success Disabled"),
|
||||||
new ("SemiColorSuccessLight", "Success Light"),
|
new ("SemiColorSuccessLight", "Success Light"),
|
||||||
new ("SemiColorSuccessLightPointerover", "Success Light Pointerover"),
|
new ("SemiColorSuccessLightPointerover", "Success Light Pointerover"),
|
||||||
@@ -305,7 +305,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorWarning", "Warning"),
|
new ("SemiColorWarning", "Warning"),
|
||||||
new ("SemiColorWarningPointerover", "Warning Pointerover"),
|
new ("SemiColorWarningPointerover", "Warning Pointerover"),
|
||||||
new ("SemiColorWarningPressed", "Warning Pressed"),
|
new ("SemiColorWarningActive", "Warning Active"),
|
||||||
new ("SemiColorWarningLight", "Warning Light"),
|
new ("SemiColorWarningLight", "Warning Light"),
|
||||||
new ("SemiColorWarningLightPointerover", "Warning Light Pointerover"),
|
new ("SemiColorWarningLightPointerover", "Warning Light Pointerover"),
|
||||||
new ("SemiColorWarningLightActive", "Warning Light Active"),
|
new ("SemiColorWarningLightActive", "Warning Light Active"),
|
||||||
@@ -315,7 +315,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorDanger", "Danger"),
|
new ("SemiColorDanger", "Danger"),
|
||||||
new ("SemiColorDangerPointerover", "Danger Pointerover"),
|
new ("SemiColorDangerPointerover", "Danger Pointerover"),
|
||||||
new ("SemiColorDangerPressed", "Danger Pressed"),
|
new ("SemiColorDangerActive", "Danger Active"),
|
||||||
new ("SemiColorDangerLight", "Danger Light"),
|
new ("SemiColorDangerLight", "Danger Light"),
|
||||||
new ("SemiColorDangerLightPointerover", "Danger Light Pointerover"),
|
new ("SemiColorDangerLightPointerover", "Danger Light Pointerover"),
|
||||||
new ("SemiColorDangerLightActive", "Danger Light Active"),
|
new ("SemiColorDangerLightActive", "Danger Light Active"),
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<UserControl
|
<UserControl
|
||||||
d:DesignHeight="450"
|
|
||||||
d:DesignWidth="800"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
x:Class="Semi.Avalonia.Demo.Views.MainView"
|
x:Class="Semi.Avalonia.Demo.Views.MainView"
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:pages="using:Semi.Avalonia.Demo.Pages"
|
xmlns:pages="using:Semi.Avalonia.Demo.Pages"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
mc:Ignorable="d">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
@@ -21,52 +21,68 @@
|
|||||||
Margin="8"
|
Margin="8"
|
||||||
Padding="12,4"
|
Padding="12,4"
|
||||||
Theme="{DynamicResource CardBorder}">
|
Theme="{DynamicResource CardBorder}">
|
||||||
<Grid ColumnDefinitions="*, Auto" VerticalAlignment="Center">
|
<Grid VerticalAlignment="Center" ColumnDefinitions="*, Auto">
|
||||||
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
Classes="H6"
|
Classes="H6"
|
||||||
Text="Semi Avalonia"
|
Text="Semi Avalonia"
|
||||||
Theme="{DynamicResource TitleTextBlock}"
|
Theme="{DynamicResource TitleTextBlock}" />
|
||||||
VerticalAlignment="Center" />
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="8,0"
|
Margin="8,0"
|
||||||
Text="/"
|
VerticalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
Text="/" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
Margin="8,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
Classes="Secondary"
|
Classes="Secondary"
|
||||||
Margin="8,0"
|
Text="{Binding #tab.SelectedItem.Header}" />
|
||||||
Text="{Binding #tab.SelectedItem.Header}"
|
|
||||||
VerticalAlignment="Center" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ToggleSwitch
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||||
Grid.Column="1"
|
<Button Theme="{DynamicResource BorderlessButton}" Click="OpenDocumentation">
|
||||||
IsCheckedChanged="ToggleButton_OnIsCheckedChanged"
|
|
||||||
Padding="4"
|
|
||||||
Theme="{DynamicResource ButtonToggleSwitch}">
|
|
||||||
<ToggleSwitch.OnContent>
|
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Data="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 15C17.476 15 17.9408 14.9525 18.3901 14.862C17.296 17.3011 14.8464 19 12 19C8.13401 19 5 15.866 5 12C5 8.60996 7.40983 5.78277 10.6099 5.13803C10.218 6.01173 10 6.98041 10 8C10 11.866 13.134 15 17 15Z"
|
Width="16"
|
||||||
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}"
|
|
||||||
Height="16"
|
Height="16"
|
||||||
Width="16" />
|
Data="M12 21.5C10.65 20.65 8.2 20 6.5 20C4.85 20 3.15 20.3 1.75 21.05C1.65 21.1 1.6 21.1 1.5 21.1C1.25 21.1 1 20.85 1 20.6V6C1.6 5.55 2.25 5.25 3 5C4.11 4.65 5.33 4.5 6.5 4.5C8.45 4.5 10.55 4.9 12 6C13.45 4.9 15.55 4.5 17.5 4.5C18.67 4.5 19.89 4.65 21 5C21.75 5.25 22.4 5.55 23 6V20.6C23 20.85 22.75 21.1 22.5 21.1C22.4 21.1 22.35 21.1 22.25 21.05C20.85 20.3 19.15 20 17.5 20C15.8 20 13.35 20.65 12 21.5M12 8V19.5C13.35 18.65 15.8 18 17.5 18C18.7 18 19.9 18.15 21 18.5V7C19.9 6.65 18.7 6.5 17.5 6.5C15.8 6.5 13.35 7.15 12 8M13 11.5C14.11 10.82 15.6 10.5 17.5 10.5C18.41 10.5 19.26 10.59 20 10.78V9.23C19.13 9.08 18.29 9 17.5 9C15.73 9 14.23 9.28 13 9.84V11.5M17.5 11.67C15.79 11.67 14.29 11.93 13 12.46V14.15C14.11 13.5 15.6 13.16 17.5 13.16C18.54 13.16 19.38 13.24 20 13.4V11.9C19.13 11.74 18.29 11.67 17.5 11.67M20 14.57C19.13 14.41 18.29 14.33 17.5 14.33C15.67 14.33 14.17 14.6 13 15.13V16.82C14.11 16.16 15.6 15.83 17.5 15.83C18.54 15.83 19.38 15.91 20 16.07V14.57Z"
|
||||||
</ToggleSwitch.OnContent>
|
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
<ToggleSwitch.OffContent>
|
</Button>
|
||||||
|
<Button Theme="{DynamicResource BorderlessButton}" Click="OpenRepository">
|
||||||
<PathIcon
|
<PathIcon
|
||||||
Data="M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"
|
Width="16"
|
||||||
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}"
|
|
||||||
Height="16"
|
Height="16"
|
||||||
Width="16" />
|
Data="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z"
|
||||||
</ToggleSwitch.OffContent>
|
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
</ToggleSwitch>
|
</Button>
|
||||||
|
<ToggleSwitch
|
||||||
|
Grid.Column="1"
|
||||||
|
Padding="4"
|
||||||
|
IsCheckedChanged="ToggleButton_OnIsCheckedChanged"
|
||||||
|
Theme="{DynamicResource ButtonToggleSwitch}">
|
||||||
|
<ToggleSwitch.OnContent>
|
||||||
|
<PathIcon
|
||||||
|
Width="16"
|
||||||
|
Height="16"
|
||||||
|
Data="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 15C17.476 15 17.9408 14.9525 18.3901 14.862C17.296 17.3011 14.8464 19 12 19C8.13401 19 5 15.866 5 12C5 8.60996 7.40983 5.78277 10.6099 5.13803C10.218 6.01173 10 6.98041 10 8C10 11.866 13.134 15 17 15Z"
|
||||||
|
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
|
</ToggleSwitch.OnContent>
|
||||||
|
<ToggleSwitch.OffContent>
|
||||||
|
<PathIcon
|
||||||
|
Width="16"
|
||||||
|
Height="16"
|
||||||
|
Data="M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"
|
||||||
|
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
|
||||||
|
</ToggleSwitch.OffContent>
|
||||||
|
</ToggleSwitch>
|
||||||
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
<TabControl
|
<TabControl
|
||||||
Grid.Row="1"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Margin="8"
|
|
||||||
Name="tab"
|
Name="tab"
|
||||||
|
Grid.Row="1"
|
||||||
|
Margin="8"
|
||||||
Padding="20,0,0,0"
|
Padding="20,0,0,0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
TabStripPlacement="Left"
|
TabStripPlacement="Left"
|
||||||
Theme="{DynamicResource NavigationTab}">
|
Theme="{DynamicResource NavigationTab}">
|
||||||
<TabItem Header="Overview">
|
<TabItem Header="Overview">
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
@@ -21,4 +22,20 @@ public partial class MainView : UserControl
|
|||||||
app.RequestedThemeVariant = theme == ThemeVariant.Dark ? ThemeVariant.Light : ThemeVariant.Dark;
|
app.RequestedThemeVariant = theme == ThemeVariant.Dark ? ThemeVariant.Light : ThemeVariant.Dark;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void OpenRepository(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var top = TopLevel.GetTopLevel(this);
|
||||||
|
if (top is null) return;
|
||||||
|
var launcher = top.Launcher;
|
||||||
|
await launcher.LaunchUriAsync(new Uri("https://github.com/irihitech/Semi.Avalonia"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void OpenDocumentation(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var top = TopLevel.GetTopLevel(this);
|
||||||
|
if (top is null) return;
|
||||||
|
var launcher = top.Launcher;
|
||||||
|
await launcher.LaunchUriAsync(new Uri("https://docs.irihi.tech/semi"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "7.0"
|
"version": "8.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "7.0.0",
|
"version": "8.0.0",
|
||||||
"rollForward": "latestMajor",
|
"rollForward": "latestMajor",
|
||||||
"allowPrerelease": true
|
"allowPrerelease": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>net6.0;net8.0;netstandard2.0</TargetFrameworks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Version>11.1.0-beta2</Version>
|
<Version>11.1.0-rc2.1</Version>
|
||||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<PackageIcon>irihi.png</PackageIcon>
|
<PackageIcon>irihi.png</PackageIcon>
|
||||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||||
<AvaloniaVersion>11.1.0-beta2</AvaloniaVersion>
|
<AvaloniaVersion>11.1.0-rc2</AvaloniaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.ColorPicker/Light.axaml" />
|
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.ColorPicker/Light.axaml" />
|
||||||
<MergeResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.ColorPicker/Dark.axaml" />
|
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.ColorPicker/Dark.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml" />
|
||||||
|
|||||||
@@ -4,7 +4,11 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Title>Semi.Avalonia.ColorPicker</Title>
|
<Title>Semi.Avalonia.ColorPicker</Title>
|
||||||
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to Avalonia 11.1-rc2</PackageReleaseNotes>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
<IsAotCompatible>true</IsAotCompatible>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
Name="BackgroundBorder"
|
Name="BackgroundBorder"
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Margin="2"
|
Margin="{DynamicResource DataGridRowMargin}"
|
||||||
Background="{DynamicResource DataGridRowBackground}"
|
Background="{DynamicResource DataGridRowBackground}"
|
||||||
CornerRadius="3" />
|
CornerRadius="3" />
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.DataGrid/Light.axaml" />
|
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.DataGrid/Light.axaml" />
|
||||||
<MergeResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.DataGrid/Dark.axaml" />
|
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.DataGrid/Dark.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia.DataGrid/DataGrid.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.DataGrid/DataGrid.axaml" />
|
||||||
|
|||||||
@@ -4,7 +4,11 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Title>Semi.Avalonia.DataGrid</Title>
|
<Title>Semi.Avalonia.DataGrid</Title>
|
||||||
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to Avalonia 11.1-rc2</PackageReleaseNotes>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
<IsAotCompatible>true</IsAotCompatible>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<StreamGeometry x:Key="DataGridColumnHeaderDescendingGlyph">M17.549 15.659L12.753 21.139C12.6591 21.2464 12.5434 21.3325 12.4135 21.3915C12.2836 21.4505 12.1427 21.481 12 21.481C11.8574 21.481 11.7164 21.4505 11.5865 21.3915C11.4566 21.3325 11.3409 21.2464 11.247 21.139L6.45101 15.659C5.88501 15.011 6.34501 14 7.20401 14H16.796C17.656 14 18.115 15.012 17.549 15.659Z</StreamGeometry>
|
<StreamGeometry x:Key="DataGridColumnHeaderDescendingGlyph">M17.549 15.659L12.753 21.139C12.6591 21.2464 12.5434 21.3325 12.4135 21.3915C12.2836 21.4505 12.1427 21.481 12 21.481C11.8574 21.481 11.7164 21.4505 11.5865 21.3915C11.4566 21.3325 11.3409 21.2464 11.247 21.139L6.45101 15.659C5.88501 15.011 6.34501 14 7.20401 14H16.796C17.656 14 18.115 15.012 17.549 15.659Z</StreamGeometry>
|
||||||
|
|
||||||
<Thickness x:Key="DataGridRowHeaderMargin">8 0</Thickness>
|
<Thickness x:Key="DataGridRowHeaderMargin">8 0</Thickness>
|
||||||
|
<Thickness x:Key="DataGridRowMargin">2</Thickness>
|
||||||
|
|
||||||
<StreamGeometry x:Key="DataGridRowGroupHeaderExpandIconGlyph">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</StreamGeometry>
|
<StreamGeometry x:Key="DataGridRowGroupHeaderExpandIconGlyph">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</StreamGeometry>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Version>11.0.1</Version>
|
<PackageReleaseNotes>Update to Avalonia 11.1-rc1</PackageReleaseNotes>
|
||||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||||
@@ -14,6 +14,10 @@
|
|||||||
<AvaloniaVersion>11.0.0</AvaloniaVersion>
|
<AvaloniaVersion>11.0.0</AvaloniaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
<IsAotCompatible>true</IsAotCompatible>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="$(AvaloniaVersion)"/>
|
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="$(AvaloniaVersion)"/>
|
||||||
<None Include="irihi.png" Pack="true" PackagePath=""/>
|
<None Include="irihi.png" Pack="true" PackagePath=""/>
|
||||||
|
|||||||
@@ -5,4 +5,5 @@
|
|||||||
</StreamGeometry>
|
</StreamGeometry>
|
||||||
<StreamGeometry x:Key="TreeDataGridSortIconAscendingPath">M6.45096 8.34102L11.247 2.86102C11.3408 2.75361 11.4566 2.66753 11.5865 2.60854C11.7163 2.54956 11.8573 2.51904 12 2.51904C12.1426 2.51904 12.2836 2.54956 12.4135 2.60854C12.5433 2.66753 12.6591 2.75361 12.753 2.86102L17.549 8.34102C18.115 8.98802 17.655 10 16.796 10H7.20396C6.34396 10 5.88496 8.98802 6.45096 8.34102Z</StreamGeometry>
|
<StreamGeometry x:Key="TreeDataGridSortIconAscendingPath">M6.45096 8.34102L11.247 2.86102C11.3408 2.75361 11.4566 2.66753 11.5865 2.60854C11.7163 2.54956 11.8573 2.51904 12 2.51904C12.1426 2.51904 12.2836 2.54956 12.4135 2.60854C12.5433 2.66753 12.6591 2.75361 12.753 2.86102L17.549 8.34102C18.115 8.98802 17.655 10 16.796 10H7.20396C6.34396 10 5.88496 8.98802 6.45096 8.34102Z</StreamGeometry>
|
||||||
<StreamGeometry x:Key="TreeDataGridItemCollapsedChevronPathData">M9.65618 3.44015L18.6322 11.2454C19.0906 11.644 19.0906 12.356 18.6322 12.7546L9.65618 20.5598C9.00895 21.1226 8 20.6629 8 19.8052V4.19475C8 3.33705 9.00895 2.87734 9.65618 3.44015Z</StreamGeometry>
|
<StreamGeometry x:Key="TreeDataGridItemCollapsedChevronPathData">M9.65618 3.44015L18.6322 11.2454C19.0906 11.644 19.0906 12.356 18.6322 12.7546L9.65618 20.5598C9.00895 21.1226 8 20.6629 8 19.8052V4.19475C8 3.33705 9.00895 2.87734 9.65618 3.44015Z</StreamGeometry>
|
||||||
|
<Thickness x:Key="TreeDataGridRowMargin">2</Thickness>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
<Panel>
|
<Panel>
|
||||||
<Border
|
<Border
|
||||||
Name="RowBorder"
|
Name="RowBorder"
|
||||||
Margin="2"
|
Margin="{DynamicResource TreeDataGridRowMargin}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
@@ -183,8 +183,7 @@
|
|||||||
<CheckBox
|
<CheckBox
|
||||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsChecked="{TemplateBinding Value,
|
IsChecked="{TemplateBinding Value, Mode=TwoWay}"
|
||||||
Mode=TwoWay}"
|
|
||||||
IsEnabled="{Binding !IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
|
IsEnabled="{Binding !IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
IsThreeState="{TemplateBinding IsThreeState}"
|
IsThreeState="{TemplateBinding IsThreeState}"
|
||||||
Theme="{DynamicResource SimpleCheckBox}" />
|
Theme="{DynamicResource SimpleCheckBox}" />
|
||||||
@@ -239,8 +238,7 @@
|
|||||||
DockPanel.Dock="Left">
|
DockPanel.Dock="Left">
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
Focusable="False"
|
Focusable="False"
|
||||||
IsChecked="{TemplateBinding IsExpanded,
|
IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}"
|
||||||
Mode=TwoWay}"
|
|
||||||
IsVisible="{TemplateBinding ShowExpander}"
|
IsVisible="{TemplateBinding ShowExpander}"
|
||||||
Theme="{StaticResource TreeDataGridExpandCollapseChevron}" />
|
Theme="{StaticResource TreeDataGridExpandCollapseChevron}" />
|
||||||
</Border>
|
</Border>
|
||||||
@@ -287,8 +285,7 @@
|
|||||||
<TextBox
|
<TextBox
|
||||||
Name="PART_Edit"
|
Name="PART_Edit"
|
||||||
Classes="Small"
|
Classes="Small"
|
||||||
Text="{TemplateBinding Value,
|
Text="{TemplateBinding Value, Mode=TwoWay}" />
|
||||||
Mode=TwoWay}" />
|
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:CompileBindings="True">
|
x:CompileBindings="True">
|
||||||
<!-- Button Theme Key: Solid Light Border Borderless; Default is Light -->
|
<!-- Button Theme Key: Light, Solid, Outline, Borderless; Default is Light -->
|
||||||
<!-- Button Default Classes: Primary Secondary, Tertiary, Warning, Danger; Default is Primary -->
|
<!-- Button Default Classes: Primary, Secondary, Tertiary, Success, Warning, Danger; Default is Primary -->
|
||||||
<!-- State: default pointerover pressed disabled -->
|
<!-- State: default, pointerover, pressed, disabled -->
|
||||||
|
|
||||||
<!-- Button Light -->
|
<!-- Button Light -->
|
||||||
<ControlTheme x:Key="{x:Type Button}" TargetType="Button">
|
<ControlTheme x:Key="{x:Type Button}" TargetType="Button">
|
||||||
@@ -85,7 +85,6 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -104,9 +103,9 @@
|
|||||||
BasedOn="{StaticResource {x:Type Button}}"
|
BasedOn="{StaticResource {x:Type Button}}"
|
||||||
TargetType="Button">
|
TargetType="Button">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||||
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
@@ -211,7 +210,39 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme
|
||||||
|
x:Key="OutlineButton"
|
||||||
|
BasedOn="{StaticResource {x:Type Button}}"
|
||||||
|
TargetType="Button">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePointeroverBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Success /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineSuccessBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Warning /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineWarningBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Danger /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type CalendarItem}" TargetType="CalendarItem">
|
<ControlTheme x:Key="{x:Type CalendarItem}" TargetType="CalendarItem">
|
||||||
|
<Setter Property="CalendarItem.MinWidth" Value="{DynamicResource CalendarMinWidth}" />
|
||||||
<Setter Property="CalendarItem.MinHeight" Value="{DynamicResource CalendarMinHeight}" />
|
<Setter Property="CalendarItem.MinHeight" Value="{DynamicResource CalendarMinHeight}" />
|
||||||
<Setter Property="CalendarItem.DayTitleTemplate">
|
<Setter Property="CalendarItem.DayTitleTemplate">
|
||||||
<Template>
|
<Template>
|
||||||
@@ -53,7 +54,7 @@
|
|||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
<Grid
|
<Grid
|
||||||
MinWidth="{DynamicResource CalendarMinWidth}"
|
MinWidth="{TemplateBinding MinWidth}"
|
||||||
MinHeight="{TemplateBinding MinHeight}"
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
|
|||||||
@@ -123,8 +123,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -166,8 +166,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -275,8 +275,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -315,8 +315,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -457,8 +457,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -512,8 +512,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -110,7 +110,6 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ Border#RootBorder">
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
@@ -232,7 +231,41 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ Border#RootBorder">
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme
|
||||||
|
x:Key="OutlineDropDownButton"
|
||||||
|
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
||||||
|
TargetType="DropDownButton">
|
||||||
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pointerover /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePointeroverBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Border#RootBorder">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Success /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineSuccessBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Warning /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineWarningBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Danger /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
@@ -244,8 +277,8 @@
|
|||||||
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
BasedOn="{StaticResource {x:Type DropDownButton}}"
|
||||||
TargetType="DropDownButton">
|
TargetType="DropDownButton">
|
||||||
<Style Selector="^ /template/ Border#RootBorder">
|
<Style Selector="^ /template/ Border#RootBorder">
|
||||||
<Setter Property="DropDownButton.Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="DropDownButton.BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ Border#RootBorder">
|
<Style Selector="^:disabled /template/ Border#RootBorder">
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
|||||||
@@ -159,6 +159,7 @@
|
|||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="{TemplateBinding Header}"
|
Content="{TemplateBinding Header}"
|
||||||
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="PART_InputGestureText"
|
x:Name="PART_InputGestureText"
|
||||||
@@ -300,6 +301,7 @@
|
|||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="{TemplateBinding Header}"
|
Content="{TemplateBinding Header}"
|
||||||
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
|
|||||||
@@ -185,6 +185,10 @@
|
|||||||
<Style Selector="^.Warning">
|
<Style Selector="^.Warning">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^.Danger">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarDangerForeground}" />
|
||||||
|
</Style>
|
||||||
|
<!-- Error style is obsolete, use Danger instead -->
|
||||||
<Style Selector="^.Error">
|
<Style Selector="^.Error">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -411,6 +415,10 @@
|
|||||||
<Style Selector="^.Warning">
|
<Style Selector="^.Warning">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^.Danger">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarDangerForeground}" />
|
||||||
|
</Style>
|
||||||
|
<!-- Error style is obsolete, use Danger instead -->
|
||||||
<Style Selector="^.Error">
|
<Style Selector="^.Error">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -4,17 +4,17 @@
|
|||||||
x:CompileBindings="True">
|
x:CompileBindings="True">
|
||||||
<ControlTheme x:Key="{x:Type RepeatButton}" TargetType="RepeatButton">
|
<ControlTheme x:Key="{x:Type RepeatButton}" TargetType="RepeatButton">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
||||||
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
|
||||||
<Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource ButtonCornerRadius}" />
|
||||||
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThickness}" />
|
||||||
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
<Setter Property="Padding" Value="{DynamicResource ButtonDefaultPadding}" />
|
||||||
<Setter Property="RenderTransform" Value="none" />
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
|
<Setter Property="RenderTransform" Value="none" />
|
||||||
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource ButtonDefaultFontSize}" />
|
||||||
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
<Setter Property="FontWeight" Value="{DynamicResource ButtonDefaultFontWeight}" />
|
||||||
|
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonDefaultHeight}" />
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="RepeatButton">
|
<ControlTemplate TargetType="RepeatButton">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Name="PART_ContentPresenter"
|
x:Name="PART_ContentPresenter"
|
||||||
Padding="{TemplateBinding Padding}"
|
Padding="{TemplateBinding Padding}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
@@ -80,17 +80,16 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
<Setter Property="Padding" Value="{DynamicResource ButtonLargePadding}" />
|
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonLargeHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonLargeHeight}" />
|
||||||
|
<Setter Property="Padding" Value="{DynamicResource ButtonLargePadding}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.Small">
|
<Style Selector="^.Small">
|
||||||
<Setter Property="Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" />
|
||||||
|
<Setter Property="Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -103,6 +102,16 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Primary">
|
<Style Selector="^.Primary">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
|
||||||
@@ -196,7 +205,39 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme
|
||||||
|
x:Key="OutlineRepeatButton"
|
||||||
|
BasedOn="{StaticResource {x:Type RepeatButton}}"
|
||||||
|
TargetType="RepeatButton">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePointeroverBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Success /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineSuccessBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Warning /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineWarningBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Danger /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
@@ -206,8 +247,8 @@
|
|||||||
BasedOn="{StaticResource {x:Type RepeatButton}}"
|
BasedOn="{StaticResource {x:Type RepeatButton}}"
|
||||||
TargetType="RepeatButton">
|
TargetType="RepeatButton">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="RepeatButton.Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="RepeatButton.BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<Setter Property="SelectableTextBlock.FontSize" Value="{DynamicResource TextBlockFontSize}" />
|
<Setter Property="SelectableTextBlock.FontSize" Value="{DynamicResource TextBlockFontSize}" />
|
||||||
<Setter Property="SelectableTextBlock.Cursor" Value="Ibeam" />
|
<Setter Property="SelectableTextBlock.Cursor" Value="Ibeam" />
|
||||||
<Setter Property="SelectableTextBlock.SelectionBrush" Value="{DynamicResource TextBlockSelectionBackground}" />
|
<Setter Property="SelectableTextBlock.SelectionBrush" Value="{DynamicResource TextBlockSelectionBackground}" />
|
||||||
|
<Setter Property="SelectableTextBlock.SelectionForegroundBrush" Value="{DynamicResource TextBlockSelectionForeground}" />
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -218,9 +218,13 @@
|
|||||||
<Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource ButtonSmallHeight}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ Button">
|
<Style Selector="^:disabled /template/ Button">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<!-- only for ToggleSplitButton -->
|
||||||
|
<Style Selector="^:checked:disabled /template/ Button">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme
|
<ControlTheme
|
||||||
@@ -301,7 +305,37 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled /template/ Button">
|
<Style Selector="^:disabled /template/ Button">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme
|
||||||
|
x:Key="OutlineSplitButton"
|
||||||
|
BasedOn="{StaticResource {x:Type SplitButton}}"
|
||||||
|
TargetType="SplitButton">
|
||||||
|
<Style Selector="^ /template/ Button">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePressedBackground}" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Success /template/ Button">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineSuccessBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Warning /template/ Button">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineWarningBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Danger /template/ Button">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:disabled /template/ Button">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Primary">
|
<Style Selector="^.Primary">
|
||||||
@@ -159,6 +160,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ToggleButtonCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -248,12 +250,12 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonIndeterminateDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonIndeterminateDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultDisabledBackground}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
|
|||||||
@@ -36,8 +36,7 @@
|
|||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
IsVisible="{TemplateBinding Content,
|
IsVisible="{TemplateBinding Content, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||||
Converter={x:Static ObjectConverters.IsNotNull}}"
|
|
||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
@@ -48,38 +47,34 @@
|
|||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
TemplatedControl.IsTemplateFocusTarget="True" />
|
TemplatedControl.IsTemplateFocusTarget="True" />
|
||||||
<Border
|
<Border
|
||||||
Name="SwitchBackgroundBorder"
|
x:Name="SwitchBackgroundBorder"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Width="40"
|
Width="{DynamicResource ToggleSwitchDefaultWidth}"
|
||||||
Height="20"
|
Height="{DynamicResource ToggleSwitchDefaultHeight}"
|
||||||
CornerRadius="100">
|
CornerRadius="100">
|
||||||
<Border.Transitions>
|
<Border.Transitions>
|
||||||
<Transitions>
|
<Transitions>
|
||||||
<BrushTransition Property="Background" Duration="0:0:0.2" />
|
<BrushTransition Property="Background" Duration="0:0:0.2" />
|
||||||
</Transitions>
|
</Transitions>
|
||||||
</Border.Transitions>
|
</Border.Transitions>
|
||||||
|
<Canvas
|
||||||
|
x:Name="PART_SwitchKnob"
|
||||||
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
|
HorizontalAlignment="Left">
|
||||||
|
<Grid
|
||||||
|
x:Name="PART_MovingKnobs"
|
||||||
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
|
Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
|
||||||
|
<Border
|
||||||
|
x:Name="SwitchKnobIndicator"
|
||||||
|
Background="White"
|
||||||
|
BoxShadow="0 0 1 1 #222E3238"
|
||||||
|
CornerRadius="100" />
|
||||||
|
</Grid>
|
||||||
|
</Canvas>
|
||||||
</Border>
|
</Border>
|
||||||
<Canvas
|
|
||||||
x:Name="PART_SwitchKnob"
|
|
||||||
Grid.Column="0"
|
|
||||||
Width="20"
|
|
||||||
Height="20"
|
|
||||||
HorizontalAlignment="Left">
|
|
||||||
<Grid
|
|
||||||
x:Name="PART_MovingKnobs"
|
|
||||||
Width="20"
|
|
||||||
Height="20">
|
|
||||||
<Border
|
|
||||||
x:Name="SwitchKnobIndicator"
|
|
||||||
Width="14"
|
|
||||||
Height="14"
|
|
||||||
Background="White"
|
|
||||||
BorderBrush="{DynamicResource ToggleSwitchIndicatorBorderBrush}"
|
|
||||||
BorderThickness="0.5"
|
|
||||||
BoxShadow="0 0 1 1 #222E3238"
|
|
||||||
CornerRadius="100" />
|
|
||||||
</Grid>
|
|
||||||
</Canvas>
|
|
||||||
|
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
x:Name="PART_OnContentPresenter"
|
x:Name="PART_OnContentPresenter"
|
||||||
@@ -154,6 +149,36 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource ToggleSwitchContainerCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ToggleSwitchContainerCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^.Small">
|
||||||
|
<Style Selector="^ /template/ Border#SwitchBackgroundBorder">
|
||||||
|
<Setter Property="Width" Value="{DynamicResource ToggleSwitchSmallWidth}" />
|
||||||
|
<Setter Property="Height" Value="{DynamicResource ToggleSwitchSmallHeight}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Canvas#PART_SwitchKnob">
|
||||||
|
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
||||||
|
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Grid#PART_MovingKnobs">
|
||||||
|
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
||||||
|
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
||||||
|
<Setter Property="Margin" Value="{DynamicResource ToggleSwitchIndicatorSmallMargin}"/>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Large">
|
||||||
|
<Style Selector="^ /template/ Border#SwitchBackgroundBorder">
|
||||||
|
<Setter Property="Width" Value="{DynamicResource ToggleSwitchLargeWidth}" />
|
||||||
|
<Setter Property="Height" Value="{DynamicResource ToggleSwitchLargeHeight}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Canvas#PART_SwitchKnob">
|
||||||
|
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
||||||
|
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ Grid#PART_MovingKnobs">
|
||||||
|
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
||||||
|
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
||||||
|
<Setter Property="Margin" Value="{DynamicResource ToggleSwitchIndicatorLargeMargin}"/>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme
|
<ControlTheme
|
||||||
@@ -205,49 +230,40 @@
|
|||||||
<Grid
|
<Grid
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
RowDefinitions="*">
|
ColumnDefinitions="Auto, *">
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="0"
|
Grid.Column="0"
|
||||||
Background="Transparent"
|
Grid.ColumnSpan="2"
|
||||||
ColumnDefinitions="Auto, *">
|
TemplatedControl.IsTemplateFocusTarget="True" />
|
||||||
<Grid
|
<Border
|
||||||
Grid.Column="0"
|
x:Name="SwitchBackgroundBorder"
|
||||||
Grid.ColumnSpan="2"
|
Grid.Column="0"
|
||||||
TemplatedControl.IsTemplateFocusTarget="True" />
|
Width="{DynamicResource ToggleSwitchDefaultWidth}"
|
||||||
<Border
|
Height="{DynamicResource ToggleSwitchDefaultHeight}"
|
||||||
Name="SwitchBackgroundBorder"
|
CornerRadius="100">
|
||||||
Grid.Column="0"
|
<Border.Transitions>
|
||||||
Width="40"
|
<Transitions>
|
||||||
Height="20"
|
<BrushTransition Property="Background" Duration="0:0:0.2" />
|
||||||
CornerRadius="100">
|
</Transitions>
|
||||||
<Border.Transitions>
|
</Border.Transitions>
|
||||||
<Transitions>
|
|
||||||
<BrushTransition Property="Background" Duration="0:0:0.2" />
|
|
||||||
</Transitions>
|
|
||||||
</Border.Transitions>
|
|
||||||
</Border>
|
|
||||||
<Canvas
|
<Canvas
|
||||||
x:Name="PART_SwitchKnob"
|
x:Name="PART_SwitchKnob"
|
||||||
Grid.Column="0"
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Width="20"
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Height="20"
|
|
||||||
HorizontalAlignment="Left">
|
HorizontalAlignment="Left">
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="PART_MovingKnobs"
|
x:Name="PART_MovingKnobs"
|
||||||
Width="20"
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Height="20">
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
|
Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
|
||||||
<Border
|
<Border
|
||||||
x:Name="SwitchKnobIndicator"
|
x:Name="SwitchKnobIndicator"
|
||||||
Width="14"
|
|
||||||
Height="14"
|
|
||||||
Background="White"
|
Background="White"
|
||||||
BorderBrush="{DynamicResource ToggleSwitchIndicatorBorderBrush}"
|
|
||||||
BorderThickness="0.5"
|
|
||||||
BoxShadow="0 0 1 1 #222E3238"
|
BoxShadow="0 0 1 1 #222E3238"
|
||||||
CornerRadius="100" />
|
CornerRadius="100" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
</Grid>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|||||||
8
src/Semi.Avalonia/Locale/en-us.axaml.cs
Normal file
8
src/Semi.Avalonia/Locale/en-us.axaml.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Locale;
|
||||||
|
|
||||||
|
public class en_us: ResourceDictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
8
src/Semi.Avalonia/Locale/zh-cn.axaml.cs
Normal file
8
src/Semi.Avalonia/Locale/zh-cn.axaml.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Locale;
|
||||||
|
|
||||||
|
public class zh_cn: ResourceDictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,7 +4,11 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Title>Semi.Avalonia</Title>
|
<Title>Semi.Avalonia</Title>
|
||||||
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to Avalonia 11.1-rc2</PackageReleaseNotes>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
<IsAotCompatible>true</IsAotCompatible>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!-- Light -->
|
<!-- Light -->
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#54A9FF" />
|
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#54A9FF" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#40B4F3" />
|
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#40B4F3" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#888D92" />
|
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Opacity="0.8" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#5DC264" />
|
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#5DC264" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FFAE43" />
|
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FFAE43" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#FC725A" />
|
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#FC725A" />
|
||||||
@@ -11,7 +11,6 @@
|
|||||||
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.12" Color="White" />
|
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.12" Color="White" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
|
<SolidColorBrush x:Key="ButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ButtonDefaultBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ButtonDefaultBorderBrush" Color="Transparent" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
|
||||||
@@ -69,8 +68,20 @@
|
|||||||
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#FC725A" />
|
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#FC725A" />
|
||||||
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#FD9983" />
|
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#FD9983" />
|
||||||
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#FDBEAC" />
|
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#FDBEAC" />
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="ButtonSolidDisabledBackground" Color="#2E3238" />
|
||||||
<!-- end Solid -->
|
<!-- end Solid -->
|
||||||
|
|
||||||
|
<!-- Outline -->
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlineBackground" Color="Transparent" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlineBorderBrush" Opacity="0.08" Color="White" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlinePointeroverBackground" Opacity="0.12" Color="White" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlinePressedBackground" Opacity="0.16" Color="White" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlineSuccessBorderBrush" Color="#5DC264" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlineWarningBorderBrush" Color="#FFAE43" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlineDangerBorderBrush" Color="#FC725A" />
|
||||||
|
<!-- end Outline -->
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ButtonInputInnerForeground" Color="#888D92" />
|
<SolidColorBrush x:Key="ButtonInputInnerForeground" Color="#888D92" />
|
||||||
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#A7ABB0" />
|
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#A7ABB0" />
|
||||||
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#C6CACD" />
|
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#C6CACD" />
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.12" Color="White" />
|
<SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.12" Color="White" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPointeroverBorderBrush" Color="#54A9FF" />
|
<SolidColorBrush x:Key="CheckBoxPointeroverBorderBrush" Color="#54A9FF" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPressedBackground" Color="#A9D7FF" />
|
<SolidColorBrush x:Key="CheckBoxPressedBackground" Opacity="0.16" Color="White" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="#A9D7FF" />
|
<SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="#A9D7FF" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#54A9FF" />
|
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#54A9FF" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary x:Class="Semi.Avalonia.Dark.Palette" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<!-- Color Resources -->
|
<!-- Color Resources -->
|
||||||
<Color x:Key="SemiRed0Color">#6C090B</Color>
|
<Color x:Key="SemiRed0Color">#6C090B</Color>
|
||||||
<Color x:Key="SemiRed1Color">#901110</Color>
|
<Color x:Key="SemiRed1Color">#901110</Color>
|
||||||
@@ -326,6 +326,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorPrimaryActive" Color="{StaticResource SemiBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
|
||||||
@@ -334,6 +335,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorSecondaryActive" Color="{StaticResource SemiLightBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryLight" Opacity="0.2" Color="{StaticResource SemiLightBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryLight" Opacity="0.2" Color="{StaticResource SemiLightBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiLightBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiLightBlue5Color}" />
|
||||||
@@ -342,6 +344,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="{StaticResource SemiGrey7Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="{StaticResource SemiGrey7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorTertiaryActive" Color="{StaticResource SemiGrey7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLight" Opacity="0.2" Color="{StaticResource SemiGrey5Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLight" Opacity="0.2" Color="{StaticResource SemiGrey5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiGrey5Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiGrey5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Opacity="0.4" Color="{StaticResource SemiGrey5Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Opacity="0.4" Color="{StaticResource SemiGrey5Color}" />
|
||||||
@@ -349,6 +352,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorInformationActive" Color="{StaticResource SemiBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
|
||||||
@@ -357,6 +361,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorSuccessActive" Color="{StaticResource SemiGreen7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessLight" Opacity="0.2" Color="{StaticResource SemiGreen5Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessLight" Opacity="0.2" Color="{StaticResource SemiGreen5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Opacity="0.3" Color="{StaticResource SemiGreen5Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Opacity="0.3" Color="{StaticResource SemiGreen5Color}" />
|
||||||
@@ -365,6 +370,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
|
<SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningPressed" Color="{StaticResource SemiOrange7Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningPressed" Color="{StaticResource SemiOrange7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorWarningActive" Color="{StaticResource SemiOrange7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLight" Opacity="0.2" Color="{StaticResource SemiOrange5Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLight" Opacity="0.2" Color="{StaticResource SemiOrange5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Opacity="0.3" Color="{StaticResource SemiOrange5Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Opacity="0.3" Color="{StaticResource SemiOrange5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLightActive" Opacity="0.4" Color="{StaticResource SemiOrange5Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLightActive" Opacity="0.4" Color="{StaticResource SemiOrange5Color}" />
|
||||||
@@ -372,6 +378,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
|
<SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerPressed" Color="{StaticResource SemiRed7Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerPressed" Color="{StaticResource SemiRed7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorDangerActive" Color="{StaticResource SemiRed7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLight" Opacity="0.2" Color="{StaticResource SemiRed5Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLight" Opacity="0.2" Color="{StaticResource SemiRed5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Opacity="0.3" Color="{StaticResource SemiRed5Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Opacity="0.3" Color="{StaticResource SemiRed5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLightActive" Opacity="0.4" Color="{StaticResource SemiRed5Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLightActive" Opacity="0.4" Color="{StaticResource SemiRed5Color}" />
|
||||||
|
|||||||
9
src/Semi.Avalonia/Themes/Dark/Palette.axaml.cs
Normal file
9
src/Semi.Avalonia/Themes/Dark/Palette.axaml.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Dark;
|
||||||
|
|
||||||
|
public class Palette: ResourceDictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,5 +9,7 @@
|
|||||||
<SolidColorBrush x:Key="ProgressBarTertiaryForeground" Color="#888D92" />
|
<SolidColorBrush x:Key="ProgressBarTertiaryForeground" Color="#888D92" />
|
||||||
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#5DC264" />
|
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#5DC264" />
|
||||||
<SolidColorBrush x:Key="ProgressBarWarningForeground" Color="#FFAE43" />
|
<SolidColorBrush x:Key="ProgressBarWarningForeground" Color="#FFAE43" />
|
||||||
|
<SolidColorBrush x:Key="ProgressBarDangerForeground" Color="#FC725A" />
|
||||||
|
<!-- Error style is obsolete, use Danger instead -->
|
||||||
<SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#FC725A" />
|
<SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#FC725A" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -7,10 +7,11 @@
|
|||||||
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FFAE43" />
|
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FFAE43" />
|
||||||
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#FC725A" />
|
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#FC725A" />
|
||||||
<SolidColorBrush x:Key="TextBlockDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="TextBlockDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.68" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="TextBlockMarkBackground" Opacity="0.2" Color="#54A9FF" />
|
||||||
<SolidColorBrush x:Key="TextBlockMarkBackground" Color="#053170" />
|
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.6" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.1" Color="#E6E8EA" />
|
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.16" Color="White" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.2" Color="#E6E8EA" />
|
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.08" Color="White" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="TextBlockSelectionBackground" Opacity="0.2" Color="#54A9FF" />
|
<SolidColorBrush x:Key="TextBlockSelectionBackground" Opacity="0.8" Color="#0041C5" />
|
||||||
|
<SolidColorBrush x:Key="TextBlockSelectionForeground" Color="White" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.12" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.12" Color="White" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||||
|
|
||||||
@@ -10,7 +9,7 @@
|
|||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#54A9FF" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#54A9FF" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#40B4F3" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#40B4F3" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#888D92" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Opacity="0.8" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#5DC264" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#5DC264" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FFAE43" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FFAE43" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" />
|
||||||
@@ -37,6 +36,7 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#FDBEAC" />
|
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#FDBEAC" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
|
||||||
|
<SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackground" Color="#2E3238" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" />
|
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" />
|
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" />
|
||||||
|
|||||||
@@ -10,6 +10,4 @@
|
|||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#7FD184" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#7FD184" />
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#A6E1A8" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#A6E1A8" />
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#277731" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#277731" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleSwitchIndicatorBorderBrush" Opacity="0.16" Color="#F9F9F9" />
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia/Themes/Light/_index.axaml" />
|
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia/Themes/Light/_index.axaml" />
|
||||||
<MergeResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia/Themes/Dark/_index.axaml" />
|
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia/Themes/Dark/_index.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/_index.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/_index.axaml" />
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!-- Light -->
|
<!-- Light -->
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#0077FA" />
|
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#0077FA" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#0095EE" />
|
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#0095EE" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#6B7075" />
|
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Opacity="0.8" Color="#1C1F23" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#3BB346" />
|
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#3BB346" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FC8800" />
|
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FC8800" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#F93920" />
|
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#F93920" />
|
||||||
@@ -11,7 +11,6 @@
|
|||||||
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPressedBackground" Opacity="0.13" Color="#2E3238" />
|
<SolidColorBrush x:Key="ButtonDefaultPressedBackground" Opacity="0.13" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultDisabledBackground" Color="#E6E8EA" />
|
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ButtonDefaultBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ButtonDefaultBorderBrush" Color="Transparent" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
|
||||||
@@ -69,8 +68,20 @@
|
|||||||
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#F93920" />
|
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#F93920" />
|
||||||
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#D52515" />
|
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#D52515" />
|
||||||
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#B2140C" />
|
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#B2140C" />
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="ButtonSolidDisabledBackground" Color="#E6E8EA" />
|
||||||
<!-- end Solid -->
|
<!-- end Solid -->
|
||||||
|
|
||||||
|
<!-- Outline -->
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlineBackground" Color="Transparent" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlineBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlinePointeroverBackground" Opacity="0.05" Color="#2E3238" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlinePressedBackground" Opacity="0.09" Color="#2E3238" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlineSuccessBorderBrush" Color="#3BB346" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlineWarningBorderBrush" Color="#FC8800" />
|
||||||
|
<SolidColorBrush x:Key="ButtonOutlineDangerBorderBrush" Color="#F93920" />
|
||||||
|
<!-- end Outline -->
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ButtonInputInnerForeground" Color="#6B7075" />
|
<SolidColorBrush x:Key="ButtonInputInnerForeground" Color="#6B7075" />
|
||||||
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#555B61" />
|
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#555B61" />
|
||||||
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#41464C" />
|
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#41464C" />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#1C1F23" />
|
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#1C1F23" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.05" Color="#2E3238" />
|
<SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.05" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPointeroverBorderBrush" Color="#0077FA" />
|
<SolidColorBrush x:Key="CheckBoxPointeroverBorderBrush" Color="#0077FA" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPressedBackground" Color="#004FB3" />
|
<SolidColorBrush x:Key="CheckBoxPressedBackground" Opacity="0.09" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="#004FB3" />
|
<SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="#004FB3" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#0077FA" />
|
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#0077FA" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary x:Class="Semi.Avalonia.Light.Palette" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<!-- Color Resources -->
|
<!-- Color Resources -->
|
||||||
<Color x:Key="SemiRed0Color">#FEF2ED</Color>
|
<Color x:Key="SemiRed0Color">#FEF2ED</Color>
|
||||||
<Color x:Key="SemiRed1Color">#FEDDD2</Color>
|
<Color x:Key="SemiRed1Color">#FEDDD2</Color>
|
||||||
@@ -326,6 +326,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorPrimaryActive" Color="{StaticResource SemiBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryLight" Color="{StaticResource SemiBlue0Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryLight" Color="{StaticResource SemiBlue0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Color="{StaticResource SemiBlue1Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Color="{StaticResource SemiBlue1Color}" />
|
||||||
@@ -334,6 +335,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorSecondaryActive" Color="{StaticResource SemiLightBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryLight" Color="{StaticResource SemiLightBlue0Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryLight" Color="{StaticResource SemiLightBlue0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Color="{StaticResource SemiLightBlue1Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Color="{StaticResource SemiLightBlue1Color}" />
|
||||||
@@ -342,6 +344,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="{StaticResource SemiGrey7Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="{StaticResource SemiGrey7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorTertiaryActive" Color="{StaticResource SemiGrey7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLight" Color="{StaticResource SemiGrey0Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLight" Color="{StaticResource SemiGrey0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Color="{StaticResource SemiGrey1Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Color="{StaticResource SemiGrey1Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Color="{StaticResource SemiGrey2Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Color="{StaticResource SemiGrey2Color}" />
|
||||||
@@ -349,6 +352,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorInformationActive" Color="{StaticResource SemiBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationLight" Color="{StaticResource SemiBlue0Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationLight" Color="{StaticResource SemiBlue0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Color="{StaticResource SemiBlue1Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Color="{StaticResource SemiBlue1Color}" />
|
||||||
@@ -357,6 +361,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorSuccessActive" Color="{StaticResource SemiGreen7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessLight" Color="{StaticResource SemiGreen0Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessLight" Color="{StaticResource SemiGreen0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Color="{StaticResource SemiGreen1Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Color="{StaticResource SemiGreen1Color}" />
|
||||||
@@ -365,6 +370,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
|
<SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningPressed" Color="{StaticResource SemiOrange7Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningPressed" Color="{StaticResource SemiOrange7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorWarningActive" Color="{StaticResource SemiOrange7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLight" Color="{StaticResource SemiOrange0Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLight" Color="{StaticResource SemiOrange0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Color="{StaticResource SemiOrange1Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Color="{StaticResource SemiOrange1Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLightActive" Color="{StaticResource SemiOrange2Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLightActive" Color="{StaticResource SemiOrange2Color}" />
|
||||||
@@ -372,6 +378,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
|
<SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerPressed" Color="{StaticResource SemiRed7Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerPressed" Color="{StaticResource SemiRed7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorDangerActive" Color="{StaticResource SemiRed7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLight" Color="{StaticResource SemiRed0Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLight" Color="{StaticResource SemiRed0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Color="{StaticResource SemiRed1Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Color="{StaticResource SemiRed1Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLightActive" Color="{StaticResource SemiRed2Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLightActive" Color="{StaticResource SemiRed2Color}" />
|
||||||
|
|||||||
9
src/Semi.Avalonia/Themes/Light/Palette.axaml.cs
Normal file
9
src/Semi.Avalonia/Themes/Light/Palette.axaml.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Light;
|
||||||
|
|
||||||
|
public class Palette: ResourceDictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,5 +9,7 @@
|
|||||||
<SolidColorBrush x:Key="ProgressBarTertiaryForeground" Color="#6B7075" />
|
<SolidColorBrush x:Key="ProgressBarTertiaryForeground" Color="#6B7075" />
|
||||||
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#3BB346" />
|
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#3BB346" />
|
||||||
<SolidColorBrush x:Key="ProgressBarWarningForeground" Color="#FC8800" />
|
<SolidColorBrush x:Key="ProgressBarWarningForeground" Color="#FC8800" />
|
||||||
|
<SolidColorBrush x:Key="ProgressBarDangerForeground" Color="#F93920" />
|
||||||
|
<!-- Error style is obsolete, use Danger instead -->
|
||||||
<SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#F93920" />
|
<SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#F93920" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -7,10 +7,11 @@
|
|||||||
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FC8800" />
|
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FC8800" />
|
||||||
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#F93920" />
|
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#F93920" />
|
||||||
<SolidColorBrush x:Key="TextBlockDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
<SolidColorBrush x:Key="TextBlockDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.68" Color="#1C1F23" />
|
|
||||||
<SolidColorBrush x:Key="TextBlockMarkBackground" Color="#EAF5FF" />
|
<SolidColorBrush x:Key="TextBlockMarkBackground" Color="#EAF5FF" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.1" Color="#2E3238" />
|
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.62" Color="#1C1F23" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.2" Color="#2E3238" />
|
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.09" Color="#2E3238" />
|
||||||
|
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.08" Color="#1C1F23" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="TextBlockSelectionBackground" Opacity="0.2" Color="#0077FA" />
|
<SolidColorBrush x:Key="TextBlockSelectionBackground" Opacity="0.8" Color="#0041C5" />
|
||||||
|
<SolidColorBrush x:Key="TextBlockSelectionForeground" Color="White" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.13" Color="#2E3238" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.13" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Color="#E6E8EA" />
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
||||||
|
|
||||||
@@ -10,7 +9,7 @@
|
|||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#0077FA" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#0077FA" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#0095EE" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#0095EE" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#6B7075" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Opacity="0.8" Color="#1C1F23" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#3BB346" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#3BB346" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FC8800" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FC8800" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#F93920" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#F93920" />
|
||||||
@@ -37,6 +36,7 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#B2140C" />
|
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#B2140C" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
|
||||||
|
<SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackground" Color="#E6E8EA" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#EAF5FF" />
|
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#EAF5FF" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#E9F7FD" />
|
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#E9F7FD" />
|
||||||
|
|||||||
@@ -10,6 +10,4 @@
|
|||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#30953B" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#30953B" />
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#25772F" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#25772F" />
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#A4E0A7" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#A4E0A7" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleSwitchIndicatorBorderBrush" Opacity="0.09" Color="#1C1F23" />
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia/Themes/Light/_index.axaml" />
|
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia/Themes/Light/_index.axaml" />
|
||||||
<MergeResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia/Themes/Dark/_index.axaml" />
|
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia/Themes/Dark/_index.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/_index.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/_index.axaml" />
|
||||||
|
|||||||
@@ -4,15 +4,16 @@ using System.Globalization;
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.Styling;
|
using Avalonia.Styling;
|
||||||
|
using Semi.Avalonia.Locale;
|
||||||
|
|
||||||
namespace Semi.Avalonia;
|
namespace Semi.Avalonia;
|
||||||
|
|
||||||
public class SemiTheme: Styles
|
public class SemiTheme: Styles
|
||||||
{
|
{
|
||||||
private static readonly Dictionary<CultureInfo, string> _localeToResource = new()
|
private static readonly Dictionary<CultureInfo, ResourceDictionary> _localeToResource = new()
|
||||||
{
|
{
|
||||||
{ new CultureInfo("zh-CN"), "avares://Semi.Avalonia/Locale/zh-CN.axaml" },
|
{ new CultureInfo("zh-cn"), new zh_cn() },
|
||||||
{ new CultureInfo("en-US"), "avares://Semi.Avalonia/Locale/en-US.axaml" },
|
{ new CultureInfo("en-us"), new en_us() },
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly IServiceProvider? sp;
|
private readonly IServiceProvider? sp;
|
||||||
@@ -30,26 +31,24 @@ public class SemiTheme: Styles
|
|||||||
{
|
{
|
||||||
_locale = value;
|
_locale = value;
|
||||||
var resource = TryGetLocaleResource(value);
|
var resource = TryGetLocaleResource(value);
|
||||||
var d = AvaloniaXamlLoader.Load(sp, new Uri(resource)) as ResourceDictionary;
|
if(resource is null) return;
|
||||||
if (d is null) return;
|
foreach (var kv in resource)
|
||||||
foreach (var kv in d)
|
|
||||||
{
|
{
|
||||||
this.Resources.Add(kv);
|
this.Resources.Add(kv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string TryGetLocaleResource(CultureInfo? locale)
|
private static ResourceDictionary? TryGetLocaleResource(CultureInfo? locale)
|
||||||
{
|
{
|
||||||
if (locale is null)
|
if (locale is null)
|
||||||
{
|
{
|
||||||
return _localeToResource[new CultureInfo("zh-CN")];
|
return _localeToResource[new CultureInfo("zh-cn")];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_localeToResource.TryGetValue(locale, out var resource))
|
if (_localeToResource.TryGetValue(locale, out var resource))
|
||||||
{
|
{
|
||||||
return resource;
|
return resource;
|
||||||
}
|
}
|
||||||
return _localeToResource[new CultureInfo("zh-CN")];
|
return _localeToResource[new CultureInfo("zh-cn")];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<x:Double x:Key="ButtonDefaultFontSize">14</x:Double>
|
<x:Double x:Key="ButtonDefaultFontSize">14</x:Double>
|
||||||
<FontWeight x:Key="ButtonDefaultFontWeight">Normal</FontWeight>
|
<FontWeight x:Key="ButtonDefaultFontWeight">600</FontWeight>
|
||||||
|
|
||||||
<Thickness x:Key="ButtonDefaultPadding">12 6</Thickness>
|
<Thickness x:Key="ButtonDefaultPadding">12 6</Thickness>
|
||||||
<Thickness x:Key="ButtonLargePadding">16 10</Thickness>
|
<Thickness x:Key="ButtonLargePadding">16 10</Thickness>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<x:Double x:Key="ToggleButtonDefaultFontSize">14</x:Double>
|
<x:Double x:Key="ToggleButtonDefaultFontSize">14</x:Double>
|
||||||
<FontWeight x:Key="ToggleButtonDefaultFontWeight">Normal</FontWeight>
|
<FontWeight x:Key="ToggleButtonDefaultFontWeight">600</FontWeight>
|
||||||
|
|
||||||
<Thickness x:Key="ToggleButtonBorderThickness">1</Thickness>
|
<Thickness x:Key="ToggleButtonBorderThickness">1</Thickness>
|
||||||
<CornerRadius x:Key="ToggleButtonCornerRadius">3</CornerRadius>
|
<CornerRadius x:Key="ToggleButtonCornerRadius">3</CornerRadius>
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
<x:Double x:Key="ToggleSwitchIndicatorDefaultWidth">18</x:Double>
|
<x:Double x:Key="ToggleSwitchIndicatorDefaultWidth">18</x:Double>
|
||||||
<x:Double x:Key="ToggleSwitchIndicatorSmallWidth">12</x:Double>
|
<x:Double x:Key="ToggleSwitchIndicatorSmallWidth">12</x:Double>
|
||||||
<x:Double x:Key="ToggleSwitchIndicatorLargeWidth">24</x:Double>
|
<x:Double x:Key="ToggleSwitchIndicatorLargeWidth">24</x:Double>
|
||||||
|
<Thickness x:Key="ToggleSwitchIndicatorDefaultMargin">2 0 0 0</Thickness>
|
||||||
|
<Thickness x:Key="ToggleSwitchIndicatorSmallMargin">1 0 0 0</Thickness>
|
||||||
|
<Thickness x:Key="ToggleSwitchIndicatorLargeMargin">3 0 0 0</Thickness>
|
||||||
|
|
||||||
<x:Double x:Key="ToggleSwitchDefaultFontSize">12</x:Double>
|
<x:Double x:Key="ToggleSwitchDefaultFontSize">12</x:Double>
|
||||||
<x:Double x:Key="ToggleSwitchLargeFontSize">14</x:Double>
|
<x:Double x:Key="ToggleSwitchLargeFontSize">14</x:Double>
|
||||||
|
|||||||
Reference in New Issue
Block a user