Compare commits

...

49 Commits

Author SHA1 Message Date
Dong Bin
5d6d4de152 Merge pull request #217 from irihitech/11.0
feat: upgrade to v11.
2023-07-05 18:22:56 +08:00
rabbitism
0c21bb264f feat: upgrade to v11. 2023-07-05 18:14:18 +08:00
Zhang Dian
8ae2d10f2e Merge pull request #213 from irihitech/rc2.1
Upgrade to RC 2.1
2023-07-04 00:28:01 +08:00
Zhang Dian
19d48f4a1f Merge pull request #215 from irihitech/scroll
Update ScrollBar visual Style
2023-07-04 00:24:56 +08:00
Zhang Dian
81565cac97 feat: reduce the size of icon on :pressed state. 2023-07-04 00:24:00 +08:00
Zhang Dian
b320c88e9e feat: add thumb :pointerover color. 2023-07-03 22:50:01 +08:00
Zhang Dian
e76c480f34 Merge pull request #214 from irihitech/progress
Progress
2023-07-03 21:28:08 +08:00
rabbitism
11452fd21f fix: fixes #208 2023-07-03 17:29:41 +08:00
rabbitism
14c2ff6c02 feat: update ScrollBar visual styles. 2023-07-03 17:13:01 +08:00
Zhang Dian
7a701a9c04 feat: add Primary, Secondary, Tertiary color. 2023-07-03 16:28:29 +08:00
Zhang Dian
7e1376f57e fix: fix default ProgressBar background color. 2023-07-03 16:28:00 +08:00
rabbitism
ae237f38fb fix: fix text visibility. 2023-07-03 11:59:42 +08:00
rabbitism
93071d3715 feat: add color styles. 2023-07-03 11:50:40 +08:00
rabbitism
27e344950a feat: add progress ring. 2023-07-03 11:49:11 +08:00
rabbitism
8bdfe2b7de fix: remove invalid fontsize resource. 2023-07-01 21:21:54 +08:00
rabbitism
e631f3fa2d fix: fix #210 2023-07-01 19:55:40 +08:00
rabbitism
793c2b273f feat: upgrade to rc2.1 2023-07-01 19:51:33 +08:00
Dong Bin
c79f696278 Merge pull request #205 from irihitech/CheckBox
CheckBox Border & SimpleCheckBox theme
2023-06-07 22:11:17 +08:00
rabbitism
5df262bc6d misc: remove radio button demo. 2023-06-07 22:10:04 +08:00
rabbitism
7a6ce6f07e misc: remove unnecessary demo. 2023-06-07 22:07:55 +08:00
Dong Bin
7335d51e7a Merge pull request #207 from irihitech/206-sg-error
Remove redundant proj file reference for Loongson-UOS compilation.
2023-06-07 21:52:21 +08:00
rabbitism
f949793e10 feat: remove redundant proj file reference. 2023-06-07 21:50:21 +08:00
Zhang Dian
43b0f5b044 feat: add SimpleCheckBox theme. 2023-06-06 16:43:45 +08:00
Zhang Dian
5021ac683b feat: add demo. 2023-06-06 16:33:27 +08:00
Zhang Dian
7a040120b5 feat: adjust CheckBox Border style. 2023-06-05 22:47:00 +08:00
Zhang Dian
6d3514308a Merge pull request #202 from irihitech/199-fix-combobox-selected-item-background-in-dark-mode
Fix: fix combobox selected background.
2023-06-04 23:25:49 +08:00
rabbitism
f7bcfb872d fix: fix combobox selected background. 2023-06-04 00:21:10 +08:00
Dong Bin
7c1fd71e43 Merge pull request #196 from irihitech/typo
fix: fix control typo.
2023-06-01 22:08:48 +08:00
Zhang Dian
8c8e13701b fix: fix control typo. 2023-06-01 17:30:22 +08:00
Zhang Dian
ff2ff9c462 Merge pull request #195 from irihitech/preview
Upgrade to Avalonia RC1
2023-06-01 11:12:51 +08:00
Zhang Dian
20307f0c1b fix: add missing success button. 2023-06-01 10:41:21 +08:00
rabbitism
21a07b703d misc: update a demo color. 2023-06-01 10:25:18 +08:00
rabbitism
e6a3274db9 docs: update docs. 2023-06-01 10:09:41 +08:00
rabbitism
f72ec20576 misc: upgrade to 1.1 2023-06-01 09:49:51 +08:00
rabbitism
071976dd05 misc: upgrade to rc1 2023-06-01 09:46:06 +08:00
rabbitism
4842270a96 fix: fix scrollviewer binding according to https://github.com/AvaloniaUI/Avalonia/pull/11456 2023-05-30 12:09:24 +08:00
rabbitism
49c95dcb5e feat: upgrade to latest nightly. 2023-05-30 11:10:24 +08:00
Dong Bin
6c16d43980 Merge pull request #193 from irihitech/taglabel
fix: fix wrong colors.
2023-05-30 10:28:21 +08:00
Zhang Dian
3289295278 fix: fix wrong colors. 2023-05-28 23:30:45 +08:00
Zhang Dian
30d9dcb1e8 Merge pull request #191 from irihitech/190-text-color
fix: fix button and label text color in dark mode.
2023-05-26 20:47:08 +08:00
Zhang Dian
c2b5b01f34 fix: togglebutton text color in dark mode. 2023-05-26 20:43:18 +08:00
rabbitism
e999aeac23 fix: fix button and label text color in dark mode. 2023-05-26 20:31:57 +08:00
Dong Bin
da025e97c5 Merge pull request #188 from irihitech/hoxfix
fix: fix missing template.
2023-05-26 20:19:33 +08:00
rabbitism
9d17cd0087 misc: add binding demo. 2023-05-26 20:18:43 +08:00
Zhang Dian
5d8297a392 fix: fix missing template. 2023-05-26 15:58:37 +08:00
Dong Bin
90a1b90b9a Merge pull request #186 from irihitech/34-HeaderedContentControl
Add a theme named GroupBox for HeaderedContentControl.
2023-05-11 00:11:50 +08:00
Zhang Dian
5475ad8bcf feat: rename theme key. 2023-05-11 00:07:18 +08:00
Zhang Dian
f29e60712b feat: specify CornerRadius. 2023-05-10 23:59:47 +08:00
Zhang Dian
cefa6bb4df feat: Add a theme for HeaderedContentControl as GroupBox. 2023-05-10 23:50:01 +08:00
49 changed files with 853 additions and 322 deletions

View File

@@ -5,13 +5,11 @@
Avalonia Theme inspired by Semi Design Avalonia Theme inspired by Semi Design
> Semi.Avalonia is still in very early stage. Please don't use in production.
# How to Use # How to Use
## Installation ## Installation
```bash ```bash
dotnet add package Semi.Avalonia --version 0.1.0-preview8 dotnet add package Semi.Avalonia --version 11.0.0-rc1
``` ```
Include Semi Design Styles in application: Include Semi Design Styles in application:
@@ -25,8 +23,8 @@ That's all.
DataGrid and ColorPicker are distributed in separated packages. Please install if you need. DataGrid and ColorPicker are distributed in separated packages. Please install if you need.
```bash ```bash
dotnet add package Semi.Avalonia.ColorPicker --version 0.1.0-preview8 dotnet add package Semi.Avalonia.ColorPicker --version 11.0.0-rc1
dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview8 dotnet add package Semi.Avalonia.DataGrid --version 11.0.0-rc1
``` ```
```xaml ```xaml
<Application.Styles> <Application.Styles>
@@ -44,6 +42,7 @@ https://github.com/irihitech/Semi.Avalonia/releases
| Semi Design Version | Avalonia Version | | Semi Design Version | Avalonia Version |
|:--------------------|:-----------------| |:--------------------|:-----------------|
| 11.0.0-rc1 | 11.0.0-rc1.1 |
| 0.1.0-preview3 | 11.0-preview4 | | 0.1.0-preview3 | 11.0-preview4 |
| 0.1.0-preview5.x | 11.0-preview5 | | 0.1.0-preview5.x | 11.0-preview5 |
| 0.1.0-preview6.x | 11.0-preview6 | | 0.1.0-preview6.x | 11.0-preview6 |

View File

@@ -1,6 +1,6 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AvaloniaVersion>11.0.0-preview8</AvaloniaVersion> <AvaloniaVersion>11.0.0</AvaloniaVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -7,7 +7,7 @@ using Application = Android.App.Application;
namespace Semi.Avalonia.Demo.Android; namespace Semi.Avalonia.Demo.Android;
[Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)] [Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)]
public class SplashActivity: AvaloniaSplashActivity<App> public class SplashActivity: AvaloniaMainActivity<App>
{ {
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{ {

View File

@@ -26,6 +26,27 @@
</CheckBox> </CheckBox>
</StackPanel> </StackPanel>
<CheckBox Width="120" HorizontalAlignment="Left">Checkbox should wrap its text</CheckBox> <CheckBox Width="120" HorizontalAlignment="Left">Checkbox should wrap its text</CheckBox>
<TextBlock Text="SimpleCheckBox" />
<StackPanel Orientation="Horizontal">
<CheckBox Theme="{StaticResource SimpleCheckBox}" />
<CheckBox IsChecked="True" Theme="{StaticResource SimpleCheckBox}" />
<CheckBox
IsChecked="{x:Null}"
IsThreeState="True"
Theme="{StaticResource SimpleCheckBox}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox IsEnabled="False" Theme="{StaticResource SimpleCheckBox}" />
<CheckBox
IsChecked="True"
IsEnabled="False"
Theme="{StaticResource SimpleCheckBox}" />
<CheckBox
IsChecked="{x:Null}"
IsEnabled="False"
IsThreeState="True"
Theme="{StaticResource SimpleCheckBox}" />
</StackPanel>
<TextBlock Margin="0,16" Text="CardCheckBox" /> <TextBlock Margin="0,16" Text="CardCheckBox" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<CheckBox Width="300" Theme="{DynamicResource CardCheckBox}"> <CheckBox Width="300" Theme="{DynamicResource CardCheckBox}">

View File

@@ -0,0 +1,14 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Semi.Avalonia.Demo.Pages.HeaderedContentControlDemo">
<ScrollViewer>
<StackPanel HorizontalAlignment="Left" Spacing="20">
<HeaderedContentControl Theme="{DynamicResource GroupBox}" Header="Semi Design">
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。</TextBlock>
</HeaderedContentControl>
</StackPanel>
</ScrollViewer>
</UserControl>

View File

@@ -0,0 +1,11 @@
using Avalonia.Controls;
namespace Semi.Avalonia.Demo.Pages;
public partial class HeaderedContentControlDemo : UserControl
{
public HeaderedContentControlDemo()
{
InitializeComponent();
}
}

View File

@@ -7,114 +7,159 @@
d:DesignHeight="800" d:DesignHeight="800"
d:DesignWidth="800" d:DesignWidth="800"
mc:Ignorable="d"> mc:Ignorable="d">
<StackPanel HorizontalAlignment="Left" Spacing="20"> <ScrollViewer>
<ProgressBar <StackPanel HorizontalAlignment="Left" Spacing="20">
Width="200" <StackPanel
Maximum="100" HorizontalAlignment="Left"
Minimum="0" Orientation="Horizontal"
ShowProgressText="True" Spacing="20">
Value="20" /> <ProgressBar
<ProgressBar Width="100"
Width="200" Height="100"
IsIndeterminate="True" Maximum="{Binding #slider.Maximum}"
Maximum="100" Minimum="{Binding #slider.Minimum}"
Minimum="0" Theme="{DynamicResource ProgressRing}"
ShowProgressText="True" Value="{Binding #slider.Value}"
Value="20" /> ShowProgressText="True"/>
<ProgressBar <ProgressBar
Width="200" Width="100"
Classes="Left" Height="100"
IsIndeterminate="True" IsIndeterminate="True"
Maximum="100" Maximum="{Binding #slider.Maximum}"
Minimum="0" Minimum="{Binding #slider.Minimum}"
ShowProgressText="True" Theme="{DynamicResource ProgressRing}"
Value="20" /> ShowProgressText="True"/>
<ProgressBar </StackPanel>
Width="200" <Slider
Classes="Left" Name="slider"
Maximum="100" Width="300"
Minimum="0" IsSnapToTickEnabled="True"
ShowProgressText="True" Maximum="100"
Value="20" /> Minimum="0"
<ProgressBar TickFrequency="10" />
Width="200" <ProgressBar
Classes="Right" Width="200"
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
ShowProgressText="True" ShowProgressText="True"
Value="20" /> Value="{Binding #slider.Value}" />
<StackPanel <ProgressBar
HorizontalAlignment="Left" Width="200"
Orientation="Horizontal" IsIndeterminate="True"
Spacing="20">
<ProgressBar
Classes="Left"
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
Orientation="Vertical"
ShowProgressText="True" ShowProgressText="True"
Value="20" /> Value="20" />
<ProgressBar <ProgressBar
Width="200"
Classes="Left"
IsIndeterminate="True"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="20" />
<ProgressBar
Width="200"
Classes="Left"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="20" />
<ProgressBar
Width="200"
Classes="Right" Classes="Right"
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
Orientation="Vertical"
ShowProgressText="True" ShowProgressText="True"
Value="20" /> Value="20" />
<StackPanel
HorizontalAlignment="Left"
Orientation="Horizontal"
Spacing="20">
<ProgressBar
Classes="Left"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="True"
Value="20" />
<ProgressBar
Classes="Right"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="True"
Value="20" />
<ProgressBar
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="True"
Value="20" />
<ProgressBar
Classes="Left"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="False"
Value="20" />
<ProgressBar
IsIndeterminate="True"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="True"
Value="20" />
<ProgressBar
IsIndeterminate="True"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="False"
Value="20" />
</StackPanel>
<ProgressBar <ProgressBar
Width="200"
Classes="Primary"
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
Orientation="Vertical"
ShowProgressText="True" ShowProgressText="True"
Value="20" /> Value="60" />
<ProgressBar <ProgressBar
Classes="Left" Width="200"
Classes="Secondary"
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
Orientation="Vertical"
ShowProgressText="False"
Value="20" />
<ProgressBar
IsIndeterminate="True"
Maximum="100"
Minimum="0"
Orientation="Vertical"
ShowProgressText="True" ShowProgressText="True"
Value="20" /> Value="60" />
<ProgressBar <ProgressBar
IsIndeterminate="True" Width="200"
Classes="Tertiary"
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
Orientation="Vertical" ShowProgressText="True"
ShowProgressText="False" Value="60" />
Value="20" /> <ProgressBar
Width="200"
Classes="Success"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="60" />
<ProgressBar
Width="200"
Classes="Warning"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="60" />
<ProgressBar
Width="200"
Classes="Error"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="60" />
</StackPanel> </StackPanel>
<ProgressBar </ScrollViewer>
Width="200"
Classes="Success"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="60" />
<ProgressBar
Width="200"
Classes="Warning"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="60" />
<ProgressBar
Width="200"
Classes="Error"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="60" />
<ProgressBar
Width="200"
Maximum="100"
Minimum="0"
ShowProgressText="True"
Value="60" />
</StackPanel>
</UserControl> </UserControl>

View File

@@ -23,25 +23,28 @@
<RadioButton Classes="Small" Theme="{DynamicResource ButtonRadioButton}">小1</RadioButton> <RadioButton Classes="Small" Theme="{DynamicResource ButtonRadioButton}">小1</RadioButton>
<RadioButton <RadioButton
Classes="Small" Classes="Small"
Theme="{DynamicResource ButtonRadioButton}" IsChecked="True"
IsChecked="True"> Theme="{DynamicResource ButtonRadioButton}">
小2 小2
</RadioButton> </RadioButton>
</StackPanel> </StackPanel>
</Border> </Border>
<Border Margin="8 0" HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}"> <Border
Margin="8,0"
HorizontalAlignment="Left"
Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<RadioButton <RadioButton
Classes="Small" Classes="Small"
Theme="{DynamicResource ButtonRadioButton}" IsEnabled="False"
IsEnabled="False"> Theme="{DynamicResource ButtonRadioButton}">
小1 小1
</RadioButton> </RadioButton>
<RadioButton <RadioButton
Classes="Small" Classes="Small"
Theme="{DynamicResource ButtonRadioButton}"
IsChecked="True" IsChecked="True"
IsEnabled="False"> IsEnabled="False"
Theme="{DynamicResource ButtonRadioButton}">
小2 小2
</RadioButton> </RadioButton>
</StackPanel> </StackPanel>
@@ -51,16 +54,19 @@
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}"> <Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<RadioButton Theme="{DynamicResource ButtonRadioButton}">默认1</RadioButton> <RadioButton Theme="{DynamicResource ButtonRadioButton}">默认1</RadioButton>
<RadioButton Theme="{DynamicResource ButtonRadioButton}" IsChecked="True">默认2</RadioButton> <RadioButton IsChecked="True" Theme="{DynamicResource ButtonRadioButton}">默认2</RadioButton>
</StackPanel> </StackPanel>
</Border> </Border>
<Border Margin="8 0" HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}"> <Border
Margin="8,0"
HorizontalAlignment="Left"
Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<RadioButton Theme="{DynamicResource ButtonRadioButton}" IsEnabled="False">默认1</RadioButton> <RadioButton IsEnabled="False" Theme="{DynamicResource ButtonRadioButton}">默认1</RadioButton>
<RadioButton <RadioButton
Theme="{DynamicResource ButtonRadioButton}" IsChecked="True"
IsEnabled="False" IsEnabled="False"
IsChecked="True"> Theme="{DynamicResource ButtonRadioButton}">
默认2 默认2
</RadioButton> </RadioButton>
</StackPanel> </StackPanel>
@@ -72,25 +78,28 @@
<RadioButton Classes="Large" Theme="{DynamicResource ButtonRadioButton}">大1</RadioButton> <RadioButton Classes="Large" Theme="{DynamicResource ButtonRadioButton}">大1</RadioButton>
<RadioButton <RadioButton
Classes="Large" Classes="Large"
Theme="{DynamicResource ButtonRadioButton}" IsChecked="True"
IsChecked="True"> Theme="{DynamicResource ButtonRadioButton}">
大2 大2
</RadioButton> </RadioButton>
</StackPanel> </StackPanel>
</Border> </Border>
<Border Margin="8 0" HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}"> <Border
Margin="8,0"
HorizontalAlignment="Left"
Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<RadioButton <RadioButton
Classes="Large" Classes="Large"
Theme="{DynamicResource ButtonRadioButton}" IsEnabled="False"
IsEnabled="False"> Theme="{DynamicResource ButtonRadioButton}">
大1 大1
</RadioButton> </RadioButton>
<RadioButton <RadioButton
Classes="Large" Classes="Large"
Theme="{DynamicResource ButtonRadioButton}"
IsChecked="True" IsChecked="True"
IsEnabled="False"> IsEnabled="False"
Theme="{DynamicResource ButtonRadioButton}">
大2 大2
</RadioButton> </RadioButton>
</StackPanel> </StackPanel>
@@ -104,7 +113,10 @@
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock> <TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel> </StackPanel>
</RadioButton> </RadioButton>
<RadioButton IsChecked="True" Width="300" Theme="{DynamicResource CardRadioButton}"> <RadioButton
Width="300"
IsChecked="True"
Theme="{DynamicResource CardRadioButton}">
<StackPanel> <StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock> <TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock> <TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
@@ -112,16 +124,19 @@
</RadioButton> </RadioButton>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<RadioButton IsEnabled="False" Width="300" Theme="{DynamicResource CardRadioButton}"> <RadioButton
Width="300"
IsEnabled="False"
Theme="{DynamicResource CardRadioButton}">
<StackPanel> <StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock> <TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock> <TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel> </StackPanel>
</RadioButton> </RadioButton>
<RadioButton <RadioButton
Width="300"
IsChecked="True" IsChecked="True"
IsEnabled="False" IsEnabled="False"
Width="300"
Theme="{DynamicResource CardRadioButton}"> Theme="{DynamicResource CardRadioButton}">
<StackPanel> <StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock> <TextBlock FontWeight="Bold">单选框标题</TextBlock>
@@ -137,7 +152,10 @@
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock> <TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel> </StackPanel>
</RadioButton> </RadioButton>
<RadioButton IsChecked="True" Width="300" Theme="{DynamicResource PureCardRadioButton}"> <RadioButton
Width="300"
IsChecked="True"
Theme="{DynamicResource PureCardRadioButton}">
<StackPanel> <StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock> <TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock> <TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
@@ -145,16 +163,19 @@
</RadioButton> </RadioButton>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<RadioButton IsEnabled="False" Width="300" Theme="{DynamicResource PureCardRadioButton}"> <RadioButton
Width="300"
IsEnabled="False"
Theme="{DynamicResource PureCardRadioButton}">
<StackPanel> <StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock> <TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock> <TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel> </StackPanel>
</RadioButton> </RadioButton>
<RadioButton <RadioButton
Width="300"
IsChecked="True" IsChecked="True"
IsEnabled="False" IsEnabled="False"
Width="300"
Theme="{DynamicResource PureCardRadioButton}"> Theme="{DynamicResource PureCardRadioButton}">
<StackPanel> <StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock> <TextBlock FontWeight="Bold">单选框标题</TextBlock>

View File

@@ -13,6 +13,7 @@
<RepeatButton Classes="Primary">Primary</RepeatButton> <RepeatButton Classes="Primary">Primary</RepeatButton>
<RepeatButton Classes="Secondary">Secondary</RepeatButton> <RepeatButton Classes="Secondary">Secondary</RepeatButton>
<RepeatButton Classes="Tertiary">Tertiary</RepeatButton> <RepeatButton Classes="Tertiary">Tertiary</RepeatButton>
<RepeatButton Classes="Success">Success</RepeatButton>
<RepeatButton Classes="Warning">Warning</RepeatButton> <RepeatButton Classes="Warning">Warning</RepeatButton>
<RepeatButton Classes="Danger">Danger</RepeatButton> <RepeatButton Classes="Danger">Danger</RepeatButton>
<RepeatButton Classes="Primary" IsEnabled="False">Danger</RepeatButton> <RepeatButton Classes="Primary" IsEnabled="False">Danger</RepeatButton>
@@ -22,6 +23,7 @@
<RepeatButton Classes="Primary" Theme="{DynamicResource SolidRepeatButton}">Primary</RepeatButton> <RepeatButton Classes="Primary" Theme="{DynamicResource SolidRepeatButton}">Primary</RepeatButton>
<RepeatButton Classes="Secondary" Theme="{DynamicResource SolidRepeatButton}">Secondary</RepeatButton> <RepeatButton Classes="Secondary" Theme="{DynamicResource SolidRepeatButton}">Secondary</RepeatButton>
<RepeatButton Classes="Tertiary" Theme="{DynamicResource SolidRepeatButton}">Tertiary</RepeatButton> <RepeatButton Classes="Tertiary" Theme="{DynamicResource SolidRepeatButton}">Tertiary</RepeatButton>
<RepeatButton Classes="Success" Theme="{DynamicResource SolidRepeatButton}">Success</RepeatButton>
<RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton> <RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton>
<RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton> <RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton>
<RepeatButton <RepeatButton
@@ -36,6 +38,7 @@
<RepeatButton Classes="Primary" Theme="{DynamicResource BorderlessRepeatButton}">Primary</RepeatButton> <RepeatButton Classes="Primary" Theme="{DynamicResource BorderlessRepeatButton}">Primary</RepeatButton>
<RepeatButton Classes="Secondary" Theme="{DynamicResource BorderlessRepeatButton}">Secondary</RepeatButton> <RepeatButton Classes="Secondary" Theme="{DynamicResource BorderlessRepeatButton}">Secondary</RepeatButton>
<RepeatButton Classes="Tertiary" Theme="{DynamicResource BorderlessRepeatButton}">Tertiary</RepeatButton> <RepeatButton Classes="Tertiary" Theme="{DynamicResource BorderlessRepeatButton}">Tertiary</RepeatButton>
<RepeatButton Classes="Success" Theme="{DynamicResource BorderlessRepeatButton}">Success</RepeatButton>
<RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton> <RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton>
<RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton> <RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton>
<RepeatButton <RepeatButton

View File

@@ -16,7 +16,7 @@
<Rectangle <Rectangle
Width="300" Width="300"
Height="300" Height="300"
Fill="#FEFBCB" /> Fill="{DynamicResource SemiYellow2}" />
</ScrollViewer> </ScrollViewer>
<ScrollViewer <ScrollViewer
Width="200" Width="200"
@@ -27,7 +27,7 @@
<Rectangle <Rectangle
Width="300" Width="300"
Height="300" Height="300"
Fill="#FEFBCB" /> Fill="{DynamicResource SemiYellow2}" />
</ScrollViewer> </ScrollViewer>
</StackPanel> </StackPanel>
</UserControl> </UserControl>

View File

@@ -4,10 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 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:vm="clr-namespace:Semi.Avalonia.Demo.Pages"
d:DesignHeight="450" d:DesignHeight="450"
d:DesignWidth="800" d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="vm:TreeViewVm"
mc:Ignorable="d"> mc:Ignorable="d">
<Panel HorizontalAlignment="Left"> <StackPanel HorizontalAlignment="Left">
<TreeView> <TreeView>
<TreeViewItem Header="Level 1"> <TreeViewItem Header="Level 1">
<TreeViewItem Header="Level 2" /> <TreeViewItem Header="Level 2" />
@@ -42,5 +45,12 @@
</TreeViewItem> </TreeViewItem>
</TreeViewItem> </TreeViewItem>
</TreeView> </TreeView>
</Panel> <TreeView ItemsSource="{Binding Items}">
<TreeView.ItemTemplate>
<TreeDataTemplate ItemsSource="{Binding Items}">
<TextBlock Text="{Binding Name}" />
</TreeDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
</StackPanel>
</UserControl> </UserControl>

View File

@@ -1,6 +1,8 @@
using System.Collections.ObjectModel;
using Avalonia; using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Markup.Xaml; using Avalonia.Markup.Xaml;
using CommunityToolkit.Mvvm.ComponentModel;
namespace Semi.Avalonia.Demo.Pages; namespace Semi.Avalonia.Demo.Pages;
@@ -9,5 +11,34 @@ public partial class TreeViewDemo : UserControl
public TreeViewDemo() public TreeViewDemo()
{ {
InitializeComponent(); InitializeComponent();
this.DataContext = new TreeViewVm();
} }
} }
public class TreeViewVm : ObservableObject
{
public ObservableCollection<TreeViewItemVm> Items { get; set; }
public TreeViewVm()
{
Items = new ObservableCollection<TreeViewItemVm>()
{
new TreeViewItemVm() {Name = "Item 1", Id = "1"},
new TreeViewItemVm() {Name = "Item 2", Id = "2"},
new TreeViewItemVm() {Name = "Item 3", Id = "3", Items = new ObservableCollection<TreeViewItemVm>()
{
new TreeViewItemVm() {Name = "Item 3.1", Id = "3.1"},
new TreeViewItemVm() {Name = "Item 3.2", Id = "3.2"},
new TreeViewItemVm() {Name = "Item 3.3", Id = "3.3"},
},
},
};
}
}
public partial class TreeViewItemVm : ObservableObject
{
public ObservableCollection<TreeViewItemVm> Items { get; set; }
public string Name { get; set; }
public string Id { get; set; }
}

View File

@@ -18,29 +18,6 @@
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" /> <PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<AdditionalFiles Include="Pages\AutoCompleteBoxDemo.axaml" />
<AdditionalFiles Include="Pages\BorderDemo.axaml" />
<AdditionalFiles Include="Pages\ButtonDemo.axaml" />
<AdditionalFiles Include="Pages\CheckBoxDemo.axaml" />
<AdditionalFiles Include="Pages\ComboBoxDemo.axaml" />
<AdditionalFiles Include="Pages\ExpanderDemo.axaml" />
<AdditionalFiles Include="Pages\FlyoutDemo.axaml" />
<AdditionalFiles Include="Pages\LabelDemo.axaml" />
<AdditionalFiles Include="Pages\ListBoxDemo.axaml" />
<AdditionalFiles Include="Pages\NotificationDemo.axaml" />
<AdditionalFiles Include="Pages\Overview.axaml" />
<AdditionalFiles Include="Pages\ProgressBarDemo.axaml" />
<AdditionalFiles Include="Pages\RadioButtonDemo.axaml" />
<AdditionalFiles Include="Pages\RepeatButtonDemo.axaml" />
<AdditionalFiles Include="Pages\TabControlDemo.axaml" />
<AdditionalFiles Include="Pages\TextBlockDemo.axaml" />
<AdditionalFiles Include="Pages\TextBoxDemo.axaml" />
<AdditionalFiles Include="Pages\ToggleButtonDemo.axaml" />
<AdditionalFiles Include="Pages\ToggleSwitchDemo.axaml" />
<AdditionalFiles Include="Pages\TreeViewDemo.axaml" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj" /> <ProjectReference Include="..\..\src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj" /> <ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj" />

View File

@@ -123,6 +123,9 @@
<TabItem Header="GridSplitter"> <TabItem Header="GridSplitter">
<pages:GridSplitter /> <pages:GridSplitter />
</TabItem> </TabItem>
<TabItem Header="HeaderedContentControl">
<pages:HeaderedContentControlDemo />
</TabItem>
<TabItem Header="Label"> <TabItem Header="Label">
<pages:LabelDemo /> <pages:LabelDemo />
</TabItem> </TabItem>

View File

@@ -3,11 +3,11 @@
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks> <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<LangVersion>10</LangVersion> <LangVersion>10</LangVersion>
<Version>0.1.0-preview8</Version> <Version>11.0.0</Version>
<Authors>IRIHI Technology</Authors> <Authors>IRIHI Technology</Authors>
<Description>Avalonia Theme inspired by Semi Design. </Description> <Description>Avalonia Theme inspired by Semi Design. </Description>
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl> <PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
<AvaloniaVersion>11.0.0-preview8</AvaloniaVersion> <AvaloniaVersion>11.0.0</AvaloniaVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -135,8 +135,8 @@
ColorComponent="{Binding ThirdComponent, ElementName=ColorSpectrum}" ColorComponent="{Binding ThirdComponent, ElementName=ColorSpectrum}"
ColorModel="Hsva" ColorModel="Hsva"
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}" HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}"
IsAlphaMaxForced="True" IsAlphaVisible="True"
IsSaturationValueMaxForced="False" IsPerceptive="False"
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}" IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
Orientation="Vertical" /> Orientation="Vertical" />
<primitives:ColorSpectrum <primitives:ColorSpectrum

View File

@@ -227,8 +227,8 @@
ColorComponent="{Binding ThirdComponent, ElementName=ColorSpectrum}" ColorComponent="{Binding ThirdComponent, ElementName=ColorSpectrum}"
ColorModel="Hsva" ColorModel="Hsva"
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}" HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}"
IsAlphaMaxForced="True" IsAlphaVisible="True"
IsSaturationValueMaxForced="False" IsPerceptive="False"
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}" IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
Orientation="Vertical" /> Orientation="Vertical" />
<primitives:ColorSpectrum <primitives:ColorSpectrum

View File

@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia.ColorPicker</Title> <Title>Semi.Avalonia.ColorPicker</Title>
<PackageReleaseNotes>Update to Avalonia 11.0.0-preview8</PackageReleaseNotes> <PackageReleaseNotes>Update to Avalonia 11.0.0-rc1</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia.DataGrid</Title> <Title>Semi.Avalonia.DataGrid</Title>
<PackageReleaseNotes>Update to Avalonia 11.0.0-preview8</PackageReleaseNotes> <PackageReleaseNotes>Update to Avalonia 11.0.0-rc1</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@@ -53,7 +53,7 @@
Data="{DynamicResource WindowExpandGlyph}" Data="{DynamicResource WindowExpandGlyph}"
Foreground="{Binding $parent[Button].Foreground}" /> Foreground="{Binding $parent[Button].Foreground}" />
</Button> </Button>
<Button x:Name="PART_MinimiseButton" Theme="{StaticResource CaptionButton}"> <Button x:Name="PART_MinimizeButton" Theme="{StaticResource CaptionButton}">
<PathIcon <PathIcon
Width="12" Width="12"
Height="12" Height="12"
@@ -99,7 +99,7 @@
<Style Selector="^:fullscreen /template/ Button#PART_RestoreButton"> <Style Selector="^:fullscreen /template/ Button#PART_RestoreButton">
<Setter Property="IsVisible" Value="False" /> <Setter Property="IsVisible" Value="False" />
</Style> </Style>
<Style Selector="^:fullscreen /template/ Button#PART_MinimiseButton"> <Style Selector="^:fullscreen /template/ Button#PART_MinimizeButton">
<Setter Property="IsVisible" Value="False" /> <Setter Property="IsVisible" Value="False" />
</Style> </Style>
</ControlTheme> </ControlTheme>

View File

@@ -4,11 +4,11 @@
x:CompileBindings="True"> x:CompileBindings="True">
<ControlTheme x:Key="{x:Type CheckBox}" TargetType="CheckBox"> <ControlTheme x:Key="{x:Type CheckBox}" TargetType="CheckBox">
<Setter Property="Padding" Value="8,0,0,0" /> <Setter Property="Padding" Value="8,0,0,0" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="HorizontalAlignment" Value="Stretch" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
<Setter Property="MinHeight" Value="32" /> <Setter Property="MinHeight" Value="32" />
@@ -17,50 +17,45 @@
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Grid x:Name="RootGrid" ColumnDefinitions="Auto,*"> <Border
<Border x:Name="RootBorder"
x:Name="PART_Border" Background="{TemplateBinding Background}"
Grid.Column="0" BorderBrush="{TemplateBinding BorderBrush}"
Grid.ColumnSpan="2" BorderThickness="{TemplateBinding BorderThickness}"
HorizontalAlignment="Center" CornerRadius="{TemplateBinding CornerRadius}">
Background="{TemplateBinding Background}" <Grid x:Name="RootGrid" ColumnDefinitions="Auto,*">
BorderBrush="{TemplateBinding BorderBrush}" <Grid
BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="0"
CornerRadius="{TemplateBinding CornerRadius}" /> Margin="0,0,0,0"
VerticalAlignment="Center">
<Grid <Border
Grid.Column="0" x:Name="NormalRectangle"
Margin="0,0,0,0" Width="{DynamicResource CheckBoxBoxWidth}"
VerticalAlignment="Center"> Height="{DynamicResource CheckBoxBoxHeight}"
<Border Background="{DynamicResource CheckBoxDefaultBackground}"
x:Name="NormalRectangle" BorderBrush="{DynamicResource CheckBoxDefaultBorderBrush}"
Width="{DynamicResource CheckBoxBoxWidth}" BorderThickness="{DynamicResource CheckBoxBoxBorderThickness}"
Height="{DynamicResource CheckBoxBoxHeight}" CornerRadius="{TemplateBinding CornerRadius}"
Background="{DynamicResource CheckBoxDefaultBackground}" UseLayoutRounding="False" />
BorderBrush="{DynamicResource CheckBoxDefaultBorderBrush}" <PathIcon
BorderThickness="{DynamicResource CheckBoxBoxBorderThickness}" Name="CheckGlyph"
CornerRadius="{TemplateBinding CornerRadius}" Width="{DynamicResource CheckBoxBoxGlyphWidth}"
UseLayoutRounding="False" /> Height="{DynamicResource CheckBoxBoxGlyphHeight}"
<PathIcon Foreground="{DynamicResource CheckBoxGlyphFill}" />
Name="CheckGlyph" </Grid>
Width="{DynamicResource CheckBoxBoxGlyphWidth}" <ContentPresenter
Height="{DynamicResource CheckBoxBoxGlyphHeight}" x:Name="ContentPresenter"
Foreground="{DynamicResource CheckBoxGlyphFill}" /> Grid.Column="1"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="Center"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
RecognizesAccessKey="True"
TextWrapping="Wrap" />
</Grid> </Grid>
<ContentPresenter </Border>
x:Name="ContentPresenter"
Grid.Column="1"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="Center"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
IsVisible="{TemplateBinding Content,
Converter={x:Static ObjectConverters.IsNotNull}}"
RecognizesAccessKey="True"
TextWrapping="Wrap" />
</Grid>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
@@ -178,6 +173,155 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="SimpleCheckBox" TargetType="CheckBox">
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
<Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" />
<Setter Property="Template">
<ControlTemplate TargetType="CheckBox">
<Border
x:Name="RootBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid x:Name="RootGrid" ColumnDefinitions="Auto,*">
<Grid
Grid.Column="0"
Margin="0,0,0,0"
VerticalAlignment="Center">
<Border
x:Name="NormalRectangle"
Width="{DynamicResource CheckBoxBoxWidth}"
Height="{DynamicResource CheckBoxBoxHeight}"
Background="{DynamicResource CheckBoxDefaultBackground}"
BorderBrush="{DynamicResource CheckBoxDefaultBorderBrush}"
BorderThickness="{DynamicResource CheckBoxBoxBorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False" />
<PathIcon
Name="CheckGlyph"
Width="{DynamicResource CheckBoxBoxGlyphWidth}"
Height="{DynamicResource CheckBoxBoxGlyphHeight}"
Foreground="{DynamicResource CheckBoxGlyphFill}" />
</Grid>
</Grid>
</Border>
</ControlTemplate>
</Setter>
<!-- Unchecked Pointerover State -->
<Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPointeroverBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxPointeroverBackground}" />
</Style>
</Style>
<!-- Unchecked Pressed State -->
<Style Selector="^:pressed">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPressedBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxPressedBackground}" />
</Style>
</Style>
<!-- Unchecked Disabled state -->
<Style Selector="^:disabled">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultDisabledBackground}" />
</Style>
</Style>
<Style Selector="^:checked">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDefaultBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDefaultBackground}" />
</Style>
<Style Selector="^ /template/ PathIcon#CheckGlyph">
<Setter Property="Data" Value="{DynamicResource CheckBoxCheckGlyph}" />
<Setter Property="Opacity" Value="1" />
</Style>
<!-- Checked Pointerover State -->
<Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointeroverBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointeroverBackground}" />
</Style>
</Style>
<!-- Checked Pressed State -->
<Style Selector="^:pressed">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPressedBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPressedBackground}" />
</Style>
</Style>
<!-- Checked Disabled State -->
<Style Selector="^:disabled">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Path#CheckGlyph">
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
</Style>
</Style>
</Style>
<Style Selector="^:indeterminate">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDefaultBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDefaultBackground}" />
</Style>
<Style Selector="^ /template/ PathIcon#CheckGlyph">
<Setter Property="Data" Value="{DynamicResource CheckBoxIndeterminateGlyph}" />
<Setter Property="Opacity" Value="1" />
</Style>
<!-- Checked Pointerover State -->
<Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointeroverBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointeroverBackground}" />
</Style>
</Style>
<!-- Checked Pressed State -->
<Style Selector="^:pressed">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPressedBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPressedBackground}" />
</Style>
</Style>
<!-- Checked Disabled State -->
<Style Selector="^:disabled">
<Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Path#CheckGlyph">
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
</Style>
</Style>
</Style>
</ControlTheme>
<ControlTheme x:Key="CardCheckBox" TargetType="CheckBox"> <ControlTheme x:Key="CardCheckBox" TargetType="CheckBox">
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />

View File

@@ -40,8 +40,6 @@
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="PlaceholderForeground" Value="{DynamicResource ComboBoxPlaceHolderForeground}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ComboBox"> <ControlTemplate TargetType="ComboBox">
<DataValidationErrors> <DataValidationErrors>
@@ -50,8 +48,8 @@
x:Name="Background" x:Name="Background"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
MinHeight="{DynamicResource ComboBoxDefaultHeight}"
MinWidth="{DynamicResource ComboBoxThemeMinWidth}" MinWidth="{DynamicResource ComboBoxThemeMinWidth}"
MinHeight="{DynamicResource ComboBoxDefaultHeight}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -63,7 +61,8 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding SelectionBoxItem,Converter={x:Static ObjectConverters.IsNull}}" IsVisible="{TemplateBinding SelectionBoxItem,
Converter={x:Static ObjectConverters.IsNull}}"
Opacity="0.3" Opacity="0.3"
Text="{TemplateBinding PlaceholderText}" /> Text="{TemplateBinding PlaceholderText}" />
<ContentPresenter <ContentPresenter
@@ -105,7 +104,8 @@
ClipToBounds="False" ClipToBounds="False"
InheritsTransform="True" InheritsTransform="True"
IsLightDismissEnabled="True" IsLightDismissEnabled="True"
IsOpen="{TemplateBinding IsDropDownOpen,Mode=TwoWay}" IsOpen="{TemplateBinding IsDropDownOpen,
Mode=TwoWay}"
PlacementTarget="Background" PlacementTarget="Background"
WindowManagerAddShadowHint="False"> WindowManagerAddShadowHint="False">
<Border <Border
@@ -118,9 +118,7 @@
BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}" BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}"
ClipToBounds="True" ClipToBounds="True"
CornerRadius="6"> CornerRadius="6">
<ScrollViewer <ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ItemsPresenter <ItemsPresenter
Name="PART_ItemsPresenter" Name="PART_ItemsPresenter"
Margin="{DynamicResource ComboBoxDropdownContentMargin}" Margin="{DynamicResource ComboBoxDropdownContentMargin}"

View File

@@ -24,6 +24,7 @@
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/GridSplitter.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/GridSplitter.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/HeaderedContentControl.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ItemsControl.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/ItemsControl.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Label.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/Label.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ListBox.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/ListBox.axaml" />

View File

@@ -0,0 +1,49 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True">
<ControlTheme x:Key="GroupBox" TargetType="HeaderedContentControl">
<Setter Property="Background" Value="{DynamicResource HeaderedContentControlDefaultBackground}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="{DynamicResource HeaderedContentControlDefaultBorderBrush}" />
<Setter Property="CornerRadius" Value="{DynamicResource HeaderedContentControlCornerRadius}" />
<Setter Property="Width" Value="400" />
<Setter Property="Height" Value="200" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Template">
<ControlTemplate TargetType="HeaderedContentControl">
<Border
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="{TemplateBinding CornerRadius}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid RowDefinitions="Auto,Auto,*">
<ContentPresenter
Grid.Row="0"
FontWeight="Bold"
HorizontalAlignment="Left"
VerticalAlignment="Stretch"
Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
Margin="16" />
<Rectangle
Grid.Row="1"
Fill="{TemplateBinding BorderBrush}"
Height="1" />
<ContentPresenter
Grid.Row="2"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Margin="16" />
</Grid>
</Border>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>

View File

@@ -342,6 +342,7 @@
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostYellowForeground}" /> <Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostYellowForeground}" />
</Style> </Style>
<Style Selector="^.White"> <Style Selector="^.White">
<Setter Property="Label.Background" Value="{DynamicResource LabelTagGhostWhiteBackground}" />
<Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostWhiteForeground}" /> <Setter Property="Label.Foreground" Value="{DynamicResource LabelTagGhostWhiteForeground}" />
<Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostWhiteBorderBrush}" /> <Setter Property="Label.BorderBrush" Value="{DynamicResource LabelTagGhostWhiteBorderBrush}" />
</Style> </Style>

View File

@@ -2,6 +2,7 @@
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"
xmlns:converters="using:Avalonia.Controls.Converters" xmlns:converters="using:Avalonia.Controls.Converters"
xmlns:semiConverters="clr-namespace:Semi.Avalonia.Converters"
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith> <Design.PreviewWith>
<StackPanel Margin="20" Spacing="20"> <StackPanel Margin="20" Spacing="20">
@@ -169,15 +170,24 @@
</Grid> </Grid>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^.Primary">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarPrimaryForeground}" />
</Style>
<Style Selector="^.Secondary">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarSecondaryForeground}" />
</Style>
<Style Selector="^.Tertiary">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarTertiaryForeground}" />
</Style>
<Style Selector="^.Success">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarSuccessForeground}" />
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarWarningForeground}" /> <Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
</Style> </Style>
<Style Selector="^.Error"> <Style Selector="^.Error">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarErrorForeground}" /> <Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarSuccessForeground}" />
</Style>
<Style Selector="^:horizontal /template/ Border#PART_Indicator"> <Style Selector="^:horizontal /template/ Border#PART_Indicator">
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Stretch" /> <Setter Property="VerticalAlignment" Value="Stretch" />
@@ -326,4 +336,105 @@
</Style> </Style>
</Style> </Style>
</ControlTheme> </ControlTheme>
<semiConverters:PositionToAngleConverter x:Key="AngleConverter" />
<ControlTheme x:Key="ProgressRing" TargetType="ProgressBar">
<Setter Property="Foreground" Value="{DynamicResource ProgressBarIndicatorBrush}" />
<Setter Property="Background" Value="{DynamicResource ProgressBarBackground}" />
<Setter Property="Template">
<ControlTemplate TargetType="ProgressBar">
<Panel>
<Border Name="PART_Indicator" />
<Arc
Name="Background"
RenderOptions.EdgeMode="Antialias"
StartAngle="-90"
Stroke="{TemplateBinding Background}"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="6"
SweepAngle="360" />
<Arc
Name="Indicator"
RenderOptions.EdgeMode="Antialias"
StartAngle="-90"
Stroke="{TemplateBinding Foreground}"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="6"
SweepAngle="{TemplateBinding Percentage,
Converter={StaticResource AngleConverter}}" />
<Arc
Name="IndeterminateIndicator"
Opacity="0"
RenderOptions.EdgeMode="Antialias"
StartAngle="-90"
Stroke="{TemplateBinding Foreground}"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="6"
SweepAngle="{TemplateBinding Percentage,
Converter={StaticResource AngleConverter}}" />
<TextBlock
Name="PART_ProgressText"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontWeight="{DynamicResource ProgressBarTextFontWeight}"
Foreground="{DynamicResource ProgressBarTextForeground}"
IsVisible="{TemplateBinding ShowProgressText}">
<TextBlock.Text>
<MultiBinding Converter="{StaticResource StringFormatConverter}">
<TemplateBinding Property="ProgressTextFormat" />
<TemplateBinding Property="Value" />
<TemplateBinding Property="Percentage" />
<TemplateBinding Property="Minimum" />
<TemplateBinding Property="Maximum" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Panel>
</ControlTemplate>
</Setter>
<Style Selector="^.Primary">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarPrimaryForeground}" />
</Style>
<Style Selector="^.Secondary">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarSecondaryForeground}" />
</Style>
<Style Selector="^.Tertiary">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarTertiaryForeground}" />
</Style>
<Style Selector="^.Success">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarSuccessForeground}" />
</Style>
<Style Selector="^.Warning">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
</Style>
<Style Selector="^.Error">
<Setter Property="ProgressBar.Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
</Style>
<Style Selector="^:indeterminate /template/ Arc#Indicator">
<Setter Property="Opacity" Value="0" />
</Style>
<Style Selector="^:indeterminate /template/ Arc#IndeterminateIndicator">
<Setter Property="Opacity" Value="1" />
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeyTime="0:0:0">
<Setter Property="StartAngle" Value="-90" />
<Setter Property="SweepAngle" Value="20" />
</KeyFrame>
<KeyFrame KeyTime="0:0:1.5">
<Setter Property="StartAngle" Value="90" />
<Setter Property="SweepAngle" Value="160" />
</KeyFrame>
<KeyFrame KeyTime="0:0:2">
<Setter Property="StartAngle" Value="270" />
<Setter Property="SweepAngle" Value="20" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
</ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -24,6 +24,10 @@
<Setter Property="RadioButton.HorizontalContentAlignment" Value="Left" /> <Setter Property="RadioButton.HorizontalContentAlignment" Value="Left" />
<Setter Property="RadioButton.VerticalContentAlignment" Value="Center" /> <Setter Property="RadioButton.VerticalContentAlignment" Value="Center" />
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonFontSize}" /> <Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonFontSize}" />
<Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonBoxCornerRadius}" />
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonForeground}" />
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonDefaultBackground}" />
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonDefaultBorderBrush}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<Border <Border

View File

@@ -21,6 +21,22 @@
<dialog:ManagedFileChooser /> <dialog:ManagedFileChooser />
</StackPanel> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="ScrollBarRepeatButton" TargetType="{x:Type RepeatButton}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="Gray" />
<Setter Property="Template">
<ControlTemplate>
<Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
Foreground="{TemplateBinding Foreground}" />
</Border>
</ControlTemplate>
</Setter>
</ControlTheme>
<ControlTheme x:Key="{x:Type ScrollBar}" TargetType="ScrollBar"> <ControlTheme x:Key="{x:Type ScrollBar}" TargetType="ScrollBar">
<Setter Property="Cursor" Value="Arrow" /> <Setter Property="Cursor" Value="Arrow" />
<Style Selector="^:horizontal"> <Style Selector="^:horizontal">
@@ -34,11 +50,14 @@
Grid.Row="0" Grid.Row="0"
Grid.Column="0" Grid.Column="0"
MinWidth="{DynamicResource ScrollBarThickness}" MinWidth="{DynamicResource ScrollBarThickness}"
Padding="4,0"
VerticalAlignment="Center" VerticalAlignment="Center"
Classes="repeat" Focusable="False"
CornerRadius="0" Theme="{DynamicResource ScrollBarRepeatButton}">
Focusable="False"> <PathIcon
<Path Data="M 4 0 L 4 8 L 0 4 Z" /> Width="10"
Height="10"
Data="{DynamicResource ScrollBarLeftGlyph}" />
</RepeatButton> </RepeatButton>
<Track <Track
Grid.Column="1" Grid.Column="1"
@@ -54,9 +73,9 @@
MinWidth="0" MinWidth="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Classes="repeattrack"
CornerRadius="0" CornerRadius="0"
Focusable="False" /> Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}" />
</Track.DecreaseButton> </Track.DecreaseButton>
<Track.IncreaseButton> <Track.IncreaseButton>
<RepeatButton <RepeatButton
@@ -64,9 +83,9 @@
MinWidth="0" MinWidth="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Classes="repeattrack"
CornerRadius="0" CornerRadius="0"
Focusable="False" /> Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}" />
</Track.IncreaseButton> </Track.IncreaseButton>
<Thumb Name="thumb" /> <Thumb Name="thumb" />
</Track> </Track>
@@ -74,11 +93,15 @@
Name="PART_LineDownButton" Name="PART_LineDownButton"
Grid.Column="2" Grid.Column="2"
MinWidth="{DynamicResource ScrollBarThickness}" MinWidth="{DynamicResource ScrollBarThickness}"
Padding="4,0"
VerticalAlignment="Center" VerticalAlignment="Center"
Classes="repeat" VerticalContentAlignment="Center"
CornerRadius="0" Focusable="False"
Focusable="False"> Theme="{DynamicResource ScrollBarRepeatButton}">
<Path Data="M 0 0 L 4 4 L 0 8 Z" /> <PathIcon
Width="10"
Height="10"
Data="{DynamicResource ScrollBarRightGlyph}" />
</RepeatButton> </RepeatButton>
</Grid> </Grid>
</Border> </Border>
@@ -95,11 +118,16 @@
Name="PART_LineUpButton" Name="PART_LineUpButton"
Grid.Row="0" Grid.Row="0"
MinHeight="{DynamicResource ScrollBarThickness}" MinHeight="{DynamicResource ScrollBarThickness}"
HorizontalAlignment="Center" Padding="0,4"
Classes="repeat" VerticalAlignment="Center"
CornerRadius="0" HorizontalContentAlignment="Center"
Focusable="False"> VerticalContentAlignment="Center"
<Path Data="M 0 4 L 8 4 L 4 0 Z" /> Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}">
<PathIcon
Width="10"
Height="10"
Data="{DynamicResource ScrollBarUpGlyph}" />
</RepeatButton> </RepeatButton>
<Track <Track
Grid.Row="1" Grid.Row="1"
@@ -116,9 +144,9 @@
MinHeight="0" MinHeight="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Classes="repeattrack"
CornerRadius="0" CornerRadius="0"
Focusable="False" /> Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}" />
</Track.DecreaseButton> </Track.DecreaseButton>
<Track.IncreaseButton> <Track.IncreaseButton>
<RepeatButton <RepeatButton
@@ -126,9 +154,9 @@
MinHeight="0" MinHeight="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Classes="repeattrack"
CornerRadius="0" CornerRadius="0"
Focusable="False" /> Focusable="False"
Theme="{DynamicResource ScrollBarRepeatButton}" />
</Track.IncreaseButton> </Track.IncreaseButton>
<Thumb Name="thumb" /> <Thumb Name="thumb" />
</Track> </Track>
@@ -136,11 +164,15 @@
Name="PART_LineDownButton" Name="PART_LineDownButton"
Grid.Row="2" Grid.Row="2"
MinHeight="{DynamicResource ScrollBarThickness}" MinHeight="{DynamicResource ScrollBarThickness}"
HorizontalAlignment="Center" Padding="0,4"
Classes="repeat" HorizontalContentAlignment="Center"
CornerRadius="0" VerticalContentAlignment="Center"
Focusable="False"> Focusable="False"
<Path Data="M 0 0 L 4 4 L 8 0 Z" /> Theme="{DynamicResource ScrollBarRepeatButton}">
<PathIcon
Width="10"
Height="10"
Data="{DynamicResource ScrollBarDownGlyph}" />
</RepeatButton> </RepeatButton>
</Grid> </Grid>
</Border> </Border>
@@ -161,10 +193,7 @@
</Setter> </Setter>
</Style> </Style>
<Style Selector="^ /template/ Thumb#thumb:pointerover"> <Style Selector="^ /template/ Thumb#thumb:pointerover">
<Setter Property="Background" Value="{DynamicResource ScrollBarButtonDefaultForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ScrollBarThumbPointeroverForeground}" />
</Style>
<Style Selector="^ /template/ Thumb#thumb:pressed">
<Setter Property="Background" Value="{DynamicResource ScrollBarButtonDefaultForeground}" />
</Style> </Style>
<Style Selector="^:horizontal /template/ Thumb#thumb"> <Style Selector="^:horizontal /template/ Thumb#thumb">
<Setter Property="MinWidth" Value="{DynamicResource ScrollBarThickness}" /> <Setter Property="MinWidth" Value="{DynamicResource ScrollBarThickness}" />
@@ -174,30 +203,14 @@
<Setter Property="MinHeight" Value="{DynamicResource ScrollBarThickness}" /> <Setter Property="MinHeight" Value="{DynamicResource ScrollBarThickness}" />
<Setter Property="Width" Value="{DynamicResource ScrollBarThumbThickness}" /> <Setter Property="Width" Value="{DynamicResource ScrollBarThumbThickness}" />
</Style> </Style>
<Style Selector="^ /template/ RepeatButton.repeat"> <Style Selector="^ /template/ RepeatButton &gt; PathIcon">
<Setter Property="Padding" Value="2" /> <Setter Property="Foreground" Value="{DynamicResource ScrollBarButtonDefaultForeground}" />
<Setter Property="BorderThickness" Value="0" />
</Style> </Style>
<Style Selector="^ /template/ RepeatButton.repeattrack"> <Style Selector="^ /template/ RepeatButton:pointerover &gt; PathIcon">
<Setter Property="Background" Value="Transparent" /> <Setter Property="Foreground" Value="{DynamicResource ScrollBarButtonPointeroverForeground}" />
<Setter Property="Template">
<ControlTemplate TargetType="RepeatButton">
<Border Background="{TemplateBinding Background}" />
</ControlTemplate>
</Setter>
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
</Style>
</Style> </Style>
<Style Selector="^ /template/ RepeatButton:pressed &gt; PathIcon">
<Style Selector="^ /template/ RepeatButton &gt; Path"> <Setter Property="RenderTransform" Value="scale(0.92)" />
<Setter Property="Fill" Value="{DynamicResource ScrollBarButtonDefaultForeground}" />
</Style>
<Style Selector="^ /template/ RepeatButton:pointerover &gt; Path">
<Setter Property="Fill" Value="{DynamicResource ScrollBarButtonPointeroverForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
@@ -214,13 +227,14 @@
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}" HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}"
HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}" HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
ScrollViewer.IsScrollInertiaEnabled="{TemplateBinding IsScrollInertiaEnabled}"
VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}" VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}"
VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}"> VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}">
<ScrollContentPresenter.GestureRecognizers> <ScrollContentPresenter.GestureRecognizers>
<ScrollGestureRecognizer <ScrollGestureRecognizer
CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}" CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}"
CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}" CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}"
IsScrollInertiaEnabled="{Binding IsScrollInertiaEnabled, RelativeSource={RelativeSource TemplatedParent}}" /> IsScrollInertiaEnabled="{Binding (ScrollViewer.IsScrollInertiaEnabled), ElementName=PART_ContentPresenter}" />
</ScrollContentPresenter.GestureRecognizers> </ScrollContentPresenter.GestureRecognizers>
</ScrollContentPresenter> </ScrollContentPresenter>
<ScrollBar <ScrollBar
@@ -263,13 +277,14 @@
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}" HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}"
HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}" HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
ScrollViewer.IsScrollInertiaEnabled="{TemplateBinding IsScrollInertiaEnabled}"
VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}" VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}"
VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}"> VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}">
<ScrollContentPresenter.GestureRecognizers> <ScrollContentPresenter.GestureRecognizers>
<ScrollGestureRecognizer <ScrollGestureRecognizer
CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}" CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}"
CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}" CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}"
IsScrollInertiaEnabled="{Binding IsScrollInertiaEnabled, RelativeSource={RelativeSource TemplatedParent}}" /> IsScrollInertiaEnabled="{Binding (ScrollViewer.IsScrollInertiaEnabled), ElementName=PART_ContentPresenter}" />
</ScrollContentPresenter.GestureRecognizers> </ScrollContentPresenter.GestureRecognizers>
</ScrollContentPresenter> </ScrollContentPresenter>
<ScrollBar <ScrollBar

View File

@@ -9,7 +9,6 @@
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="{x:Type TextBlock}" TargetType="TextBlock"> <ControlTheme x:Key="{x:Type TextBlock}" TargetType="TextBlock">
<!--<Setter Property="TextBlock.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" />--> <!--<Setter Property="TextBlock.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" />-->
<Setter Property="TextBlock.FontSize" Value="{DynamicResource TextBlockFontSize}" />
<Style Selector="^.Secondary"> <Style Selector="^.Secondary">
<Setter Property="TextBlock.Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" /> <Setter Property="TextBlock.Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" />
</Style> </Style>

View File

@@ -15,6 +15,14 @@
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="KnobTransitions">
<Transitions>
<DoubleTransition
Easing="CubicEaseOut"
Property="Canvas.Left"
Duration="0:0:0.2" />
</Transitions>
</Setter>
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ToggleSwitch"> <ControlTemplate TargetType="ToggleSwitch">
<Grid <Grid
@@ -103,18 +111,6 @@
<Setter Property="Margin" Value="0" /> <Setter Property="Margin" Value="0" />
</Style> </Style>
<!-- NormalState -->
<Style Selector="^:not(:dragging) /template/ Grid#PART_MovingKnobs">
<Setter Property="Transitions">
<Transitions>
<DoubleTransition
Easing="CubicEaseOut"
Property="Canvas.Left"
Duration="0:0:0.2" />
</Transitions>
</Setter>
</Style>
<Style Selector="^:unchecked"> <Style Selector="^:unchecked">
<Style Selector="^ /template/ ContentPresenter#PART_OnContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_OnContentPresenter">
<Setter Property="ContentPresenter.IsVisible" Value="False" /> <Setter Property="ContentPresenter.IsVisible" Value="False" />

View File

@@ -5,17 +5,28 @@
<ControlTheme x:Key="{x:Type TransitioningContentControl}" TargetType="TransitioningContentControl"> <ControlTheme x:Key="{x:Type TransitioningContentControl}" TargetType="TransitioningContentControl">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<ContentPresenter <Panel>
Name="PART_ContentPresenter" <ContentPresenter
Padding="{TemplateBinding Padding}" Name="PART_ContentPresenter"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Background="{TemplateBinding Background}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"
Content="{TemplateBinding CurrentContent}" BorderThickness="{TemplateBinding BorderThickness}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
<ContentPresenter
Name="PART_ContentPresenter2"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" />
</Panel>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>

View File

@@ -131,6 +131,7 @@
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}"
Content="{TemplateBinding Header}" Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
Focusable="False" Focusable="False"
Foreground="{TemplateBinding Foreground}" /> Foreground="{TemplateBinding Foreground}" />
</Grid> </Grid>

View File

@@ -0,0 +1,27 @@
using System;
using System.Globalization;
using Avalonia.Data.Converters;
namespace Semi.Avalonia.Converters;
public class PositionToAngleConverter: IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is double d)
{
return d * 3.6;
}
return 0;
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is double d)
{
return d / 3.6;
}
return 0;
}
}

View File

@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia</Title> <Title>Semi.Avalonia</Title>
<PackageReleaseNotes>Update to Avalonia 11.0.0-preview8</PackageReleaseNotes> <PackageReleaseNotes>Update to Avalonia 11.0.0-rc1</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@@ -36,7 +36,7 @@
<!-- end Light --> <!-- end Light -->
<!-- Solid --> <!-- Solid -->
<SolidColorBrush x:Key="ButtonSolidForeground" Color="Black" /> <SolidColorBrush x:Key="ButtonSolidForeground" Color="White" />
<SolidColorBrush x:Key="ButtonSolidDisabledForeground" Color="Gray" /> <SolidColorBrush x:Key="ButtonSolidDisabledForeground" Color="Gray" />
<SolidColorBrush x:Key="ButtonSolidPrimaryBackground" Color="#54A9FF" /> <SolidColorBrush x:Key="ButtonSolidPrimaryBackground" Color="#54A9FF" />

View File

@@ -29,8 +29,8 @@
<SolidColorBrush x:Key="ComboBoxItemBackground" Color="Transparent" /> <SolidColorBrush x:Key="ComboBoxItemBackground" Color="Transparent" />
<SolidColorBrush x:Key="ComboBoxItemPointeroverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ComboBoxItemPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ComboBoxItemPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ComboBoxItemPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ComboBoxItemSelectedBackground" Color="#053170" /> <SolidColorBrush x:Key="ComboBoxItemSelectedBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="ComboBoxItemSelectedPointeroverBackground" Color="#0A4694" /> <SolidColorBrush x:Key="ComboBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#54A9FF" />
<SolidColorBrush x:Key="ComboBoxItemDisabledBackground" Color="Transparent" /> <SolidColorBrush x:Key="ComboBoxItemDisabledBackground" Color="Transparent" />
<SolidColorBrush x:Key="ComboBoxItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="ComboBoxItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" />

View File

@@ -19,6 +19,7 @@
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DropDownButton.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DropDownButton.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Expander.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Expander.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/GridSplitter.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/GridSplitter.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/HeaderedContentControl.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Label.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Label.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ListBox.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ListBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ManagedFileChooser.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ManagedFileChooser.axaml" />

View File

@@ -0,0 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="HeaderedContentControlDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="HeaderedContentControlDefaultBorderBrush" Opacity="0.08" Color="#F9F9F9" />
<CornerRadius x:Key="HeaderedContentControlCornerRadius">4</CornerRadius>
</ResourceDictionary>

View File

@@ -1,5 +1,6 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=System.Runtime"> xmlns:sys="clr-namespace:System;assembly=System.Runtime">
<!-- Typography related resources are combined with TextBlock --> <!-- Typography related resources are combined with TextBlock -->
@@ -28,8 +29,8 @@
<SolidColorBrush x:Key="LabelTagLightLightBlueBackground" Opacity="0.15" Color="#40B4F3" /> <SolidColorBrush x:Key="LabelTagLightLightBlueBackground" Opacity="0.15" Color="#40B4F3" />
<SolidColorBrush x:Key="LabelTagLightLightGreenForeground" Color="#E4F1D1" /> <SolidColorBrush x:Key="LabelTagLightLightGreenForeground" Color="#E4F1D1" />
<SolidColorBrush x:Key="LabelTagLightLightGreenBackground" Opacity="0.15" Color="#97C65F" /> <SolidColorBrush x:Key="LabelTagLightLightGreenBackground" Opacity="0.15" Color="#97C65F" />
<SolidColorBrush x:Key="LabelTagLightLimeForeground" Color="#AEDC3A" /> <SolidColorBrush x:Key="LabelTagLightLimeForeground" Color="#E5F6C9" />
<SolidColorBrush x:Key="LabelTagLightLimeBackground" Opacity="0.15" Color="#E5F6C9" /> <SolidColorBrush x:Key="LabelTagLightLimeBackground" Opacity="0.15" Color="#AEDC3A" />
<SolidColorBrush x:Key="LabelTagLightOrangeForeground" Color="#FFEFD0" /> <SolidColorBrush x:Key="LabelTagLightOrangeForeground" Color="#FFEFD0" />
<SolidColorBrush x:Key="LabelTagLightOrangeBackground" Opacity="0.15" Color="#FFAE43" /> <SolidColorBrush x:Key="LabelTagLightOrangeBackground" Opacity="0.15" Color="#FFAE43" />
<SolidColorBrush x:Key="LabelTagLightPinkForeground" Color="#FBD3DC" /> <SolidColorBrush x:Key="LabelTagLightPinkForeground" Color="#FBD3DC" />
@@ -40,13 +41,13 @@
<SolidColorBrush x:Key="LabelTagLightRedBackground" Opacity="0.15" Color="#FC725A" /> <SolidColorBrush x:Key="LabelTagLightRedBackground" Opacity="0.15" Color="#FC725A" />
<SolidColorBrush x:Key="LabelTagLightTealForeground" Color="#C4F0E8" /> <SolidColorBrush x:Key="LabelTagLightTealForeground" Color="#C4F0E8" />
<SolidColorBrush x:Key="LabelTagLightTealBackground" Opacity="0.15" Color="#33C2B0" /> <SolidColorBrush x:Key="LabelTagLightTealBackground" Opacity="0.15" Color="#33C2B0" />
<SolidColorBrush x:Key="LabelTagLightVioletForeground" Color="#8865D4" /> <SolidColorBrush x:Key="LabelTagLightVioletForeground" Color="#DDD4F4" />
<SolidColorBrush x:Key="LabelTagLightVioletBackground" Opacity="0.15" Color="#DDD4F4" /> <SolidColorBrush x:Key="LabelTagLightVioletBackground" Opacity="0.15" Color="#8865D4" />
<SolidColorBrush x:Key="LabelTagLightYellowForeground" Color="#FEFBD0" /> <SolidColorBrush x:Key="LabelTagLightYellowForeground" Color="#FEFBD0" />
<SolidColorBrush x:Key="LabelTagLightYellowBackground" Opacity="0.15" Color="#FDDE43" /> <SolidColorBrush x:Key="LabelTagLightYellowBackground" Opacity="0.15" Color="#FDDE43" />
<SolidColorBrush x:Key="LabelTagLightWhiteForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="LabelTagLightWhiteBackground" Color="#4F5159" />
<SolidColorBrush x:Key="LabelTagLightWhiteBackground" Opacity="0.15" Color="#4F5159" />
<SolidColorBrush x:Key="LabelTagLightWhiteBorderBrush" Color="#41464C" /> <SolidColorBrush x:Key="LabelTagLightWhiteBorderBrush" Color="#41464C" />
<SolidColorBrush x:Key="LabelTagLightWhiteForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="LabelTagGhostAmberBorderBrush" Color="#F2B726" /> <SolidColorBrush x:Key="LabelTagGhostAmberBorderBrush" Color="#F2B726" />
<SolidColorBrush x:Key="LabelTagGhostAmberForeground" Color="#F5CA50" /> <SolidColorBrush x:Key="LabelTagGhostAmberForeground" Color="#F5CA50" />
@@ -80,10 +81,11 @@
<SolidColorBrush x:Key="LabelTagGhostVioletForeground" Color="#8865D4" /> <SolidColorBrush x:Key="LabelTagGhostVioletForeground" Color="#8865D4" />
<SolidColorBrush x:Key="LabelTagGhostYellowBorderBrush" Color="#FCCE14" /> <SolidColorBrush x:Key="LabelTagGhostYellowBorderBrush" Color="#FCCE14" />
<SolidColorBrush x:Key="LabelTagGhostYellowForeground" Color="#FDDE43" /> <SolidColorBrush x:Key="LabelTagGhostYellowForeground" Color="#FDDE43" />
<SolidColorBrush x:Key="LabelTagGhostWhiteBackground" Color="#4F5159" />
<SolidColorBrush x:Key="LabelTagGhostWhiteBorderBrush" Color="#41464C" /> <SolidColorBrush x:Key="LabelTagGhostWhiteBorderBrush" Color="#41464C" />
<SolidColorBrush x:Key="LabelTagGhostWhiteForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="LabelTagGhostWhiteForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="LabelTagSolidForeground" Color="#000000" /> <SolidColorBrush x:Key="LabelTagSolidForeground" Color="White" />
<SolidColorBrush x:Key="LabelTagSolidAmberBackground" Color="#F5CA50" /> <SolidColorBrush x:Key="LabelTagSolidAmberBackground" Color="#F5CA50" />
<SolidColorBrush x:Key="LabelTagSolidBlueBackground" Color="#54A9FF" /> <SolidColorBrush x:Key="LabelTagSolidBlueBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="LabelTagSolidCyanBackground" Color="#38BBC6" /> <SolidColorBrush x:Key="LabelTagSolidCyanBackground" Color="#38BBC6" />

View File

@@ -7,6 +7,9 @@
<SolidColorBrush x:Key="ProgressBarOuterTextForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="ProgressBarOuterTextForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ProgressBarRootBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="ProgressBarRootBorderBrush" Color="Transparent" />
<FontWeight x:Key="ProgressBarTextFontWeight">600</FontWeight> <FontWeight x:Key="ProgressBarTextFontWeight">600</FontWeight>
<SolidColorBrush x:Key="ProgressBarPrimaryForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="ProgressBarSecondaryForeground" Color="#40B4F3" />
<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="ProgressBarErrorForeground" Color="#FC725A" /> <SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#FC725A" />

View File

@@ -32,6 +32,9 @@
<SolidColorBrush x:Key="RadioButtonCheckGlyphFill" Color="White" /> <SolidColorBrush x:Key="RadioButtonCheckGlyphFill" Color="White" />
<SolidColorBrush x:Key="RadioButtonForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="RadioButtonForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="RadioButtonDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="RadioButtonDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
<CornerRadius x:Key="RadioButtonBoxCornerRadius">3</CornerRadius>
<SolidColorBrush x:Key="RadioButtonGroupBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="RadioButtonGroupBackground" Opacity="0.12" Color="White" />

View File

@@ -2,11 +2,17 @@
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"
xmlns:sys="clr-namespace:System;assembly=System.Runtime"> xmlns:sys="clr-namespace:System;assembly=System.Runtime">
<sys:Double x:Key="ScrollBarThickness">12</sys:Double> <sys:Double x:Key="ScrollBarThickness">14</sys:Double>
<sys:Double x:Key="ScrollBarThumbThickness">8</sys:Double> <sys:Double x:Key="ScrollBarThumbThickness">10</sys:Double>
<SolidColorBrush x:Key="ScrollBarButtonDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="ScrollBarButtonDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ScrollBarButtonDefaultForeground" Opacity="0.62" Color="#F9F9F9" /> <SolidColorBrush x:Key="ScrollBarButtonDefaultForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ScrollBarButtonPointeroverForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="ScrollBarButtonPointeroverForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="ScrollBarThumbForeground" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="ScrollBarThumbForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ScrollBarBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ScrollBarThumbPointeroverForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="ScrollBarBackground" Color="Transparent" />
<PathGeometry x:Key="ScrollBarLeftGlyph">M16.3176 6.95628V17.0878C16.3176 17.4871 15.8725 17.7253 15.5402 17.5038L7.94161 12.438C7.64474 12.2401 7.64474 11.8039 7.94161 11.606L15.5402 6.54025C15.8725 6.31873 16.3176 6.55693 16.3176 6.95628Z</PathGeometry>
<PathGeometry x:Key="ScrollBarRightGlyph">M9 17.0657V6.93425C9 6.5349 9.44507 6.29671 9.77735 6.51823L17.376 11.584C17.6728 11.7819 17.6728 12.2181 17.376 12.416L9.77735 17.4818C9.44507 17.7033 9 17.4651 9 17.0657Z</PathGeometry>
<PathGeometry x:Key="ScrollBarUpGlyph">M17.0839 16.3212H6.9524C6.55305 16.3212 6.31486 15.8761 6.53638 15.5438L11.6021 7.94521C11.8 7.64834 12.2363 7.64834 12.4342 7.94521L17.4999 15.5438C17.7214 15.8761 17.4832 16.3212 17.0839 16.3212Z</PathGeometry>
<PathGeometry x:Key="ScrollBarDownGlyph">M6.95249 7.72265L17.084 7.72265C17.4833 7.72265 17.7215 8.16772 17.5 8.5L12.4343 16.0986C12.2363 16.3955 11.8001 16.3955 11.6022 16.0986L6.53647 8.5C6.31495 8.16772 6.55315 7.72265 6.95249 7.72265Z</PathGeometry>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -49,7 +49,7 @@
<SolidColorBrush x:Key="ToggleButtonWarningCheckedPressedBackground" Color="#FFDDA1" /> <SolidColorBrush x:Key="ToggleButtonWarningCheckedPressedBackground" Color="#FFDDA1" />
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#FDBEAC" /> <SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#FDBEAC" />
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="Black" /> <SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" /> <SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" />
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" /> <SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" />

View File

@@ -0,0 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="HeaderedContentControlDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="HeaderedContentControlDefaultBorderBrush" Opacity="0.08" Color="#1C1F23" />
<CornerRadius x:Key="HeaderedContentControlCornerRadius">4</CornerRadius>
</ResourceDictionary>

View File

@@ -28,8 +28,8 @@
<SolidColorBrush x:Key="LabelTagLightLightBlueBackground" Opacity="0.15" Color="#0095EE" /> <SolidColorBrush x:Key="LabelTagLightLightBlueBackground" Opacity="0.15" Color="#0095EE" />
<SolidColorBrush x:Key="LabelTagLightLightGreenForeground" Color="#395B1B" /> <SolidColorBrush x:Key="LabelTagLightLightGreenForeground" Color="#395B1B" />
<SolidColorBrush x:Key="LabelTagLightLightGreenBackground" Opacity="0.15" Color="#7BB63C" /> <SolidColorBrush x:Key="LabelTagLightLightGreenBackground" Opacity="0.15" Color="#7BB63C" />
<SolidColorBrush x:Key="LabelTagLightLimeForeground" Color="#9BD100" /> <SolidColorBrush x:Key="LabelTagLightLimeForeground" Color="#486800" />
<SolidColorBrush x:Key="LabelTagLightLimeBackground" Opacity="0.15" Color="#486800" /> <SolidColorBrush x:Key="LabelTagLightLimeBackground" Opacity="0.15" Color="#9BD100" />
<SolidColorBrush x:Key="LabelTagLightOrangeForeground" Color="#7E3100" /> <SolidColorBrush x:Key="LabelTagLightOrangeForeground" Color="#7E3100" />
<SolidColorBrush x:Key="LabelTagLightOrangeBackground" Opacity="0.15" Color="#FC8800" /> <SolidColorBrush x:Key="LabelTagLightOrangeBackground" Opacity="0.15" Color="#FC8800" />
<SolidColorBrush x:Key="LabelTagLightPinkForeground" Color="#7E053A" /> <SolidColorBrush x:Key="LabelTagLightPinkForeground" Color="#7E053A" />

View File

@@ -18,6 +18,7 @@
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/DropDownButton.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/DropDownButton.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Expander.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Expander.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/GridSplitter.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/GridSplitter.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/HeaderedContentControl.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Label.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Label.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/ListBox.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/ListBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/ManagedFileChooser.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/ManagedFileChooser.axaml" />

View File

@@ -2,11 +2,14 @@
<!-- Add Resources Here --> <!-- Add Resources Here -->
<SolidColorBrush x:Key="ProgressBarIndicatorBrush" Color="#0077FA" /> <SolidColorBrush x:Key="ProgressBarIndicatorBrush" Color="#0077FA" />
<CornerRadius x:Key="ProgressBarBackgroundCornerRadius">3</CornerRadius> <CornerRadius x:Key="ProgressBarBackgroundCornerRadius">3</CornerRadius>
<SolidColorBrush x:Key="ProgressBarBackground" Opacity="0.5" Color="#2E3238" /> <SolidColorBrush x:Key="ProgressBarBackground" Opacity="0.05" Color="#2E3238" />
<SolidColorBrush x:Key="ProgressBarTextForeground" Color="#1C1F23" /> <SolidColorBrush x:Key="ProgressBarTextForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="ProgressBarOuterTextForeground" Color="#1C1F23" /> <SolidColorBrush x:Key="ProgressBarOuterTextForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="ProgressBarRootBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="ProgressBarRootBorderBrush" Color="Transparent" />
<FontWeight x:Key="ProgressBarTextFontWeight">600</FontWeight> <FontWeight x:Key="ProgressBarTextFontWeight">600</FontWeight>
<SolidColorBrush x:Key="ProgressBarPrimaryForeground" Color="#0077FA" />
<SolidColorBrush x:Key="ProgressBarSecondaryForeground" Color="#0095EE" />
<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="ProgressBarErrorForeground" Color="#F93920" /> <SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#F93920" />

View File

@@ -32,6 +32,9 @@
<SolidColorBrush x:Key="RadioButtonCheckGlyphFill" Color="White" /> <SolidColorBrush x:Key="RadioButtonCheckGlyphFill" Color="White" />
<SolidColorBrush x:Key="RadioButtonForeground" Color="#1C1F23" /> <SolidColorBrush x:Key="RadioButtonForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="RadioButtonDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="RadioButtonDefaultBorderBrush" Opacity="0.35" Color="#1C1F23" />
<CornerRadius x:Key="RadioButtonBoxCornerRadius">3</CornerRadius>
<SolidColorBrush x:Key="RadioButtonGroupBackground" Opacity="0.05" Color="#2E3238" /> <SolidColorBrush x:Key="RadioButtonGroupBackground" Opacity="0.05" Color="#2E3238" />

View File

@@ -2,11 +2,16 @@
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"
xmlns:sys="clr-namespace:System;assembly=System.Runtime"> xmlns:sys="clr-namespace:System;assembly=System.Runtime">
<sys:Double x:Key="ScrollBarThickness">12</sys:Double> <sys:Double x:Key="ScrollBarThickness">14</sys:Double>
<sys:Double x:Key="ScrollBarThumbThickness">8</sys:Double> <sys:Double x:Key="ScrollBarThumbThickness">10</sys:Double>
<SolidColorBrush x:Key="ScrollBarButtonDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="ScrollBarButtonDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ScrollBarButtonDefaultForeground" Opacity="0.62" Color="#1C1F23" /> <SolidColorBrush x:Key="ScrollBarButtonDefaultForeground" Opacity="0.35" Color="#1C1F23" />
<SolidColorBrush x:Key="ScrollBarButtonPointeroverForeground" Color="#1C1F23" /> <SolidColorBrush x:Key="ScrollBarButtonPointeroverForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="ScrollBarThumbForeground" Opacity="0.35" Color="#1C1F23" /> <SolidColorBrush x:Key="ScrollBarThumbForeground" Opacity="0.35" Color="#1C1F23" />
<SolidColorBrush x:Key="ScrollBarBackground" Opacity="0.05" Color="#2E3238" /> <SolidColorBrush x:Key="ScrollBarThumbPointeroverForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="ScrollBarBackground" Color="Transparent" />
<PathGeometry x:Key="ScrollBarLeftGlyph">M16.3176 6.95628V17.0878C16.3176 17.4871 15.8725 17.7253 15.5402 17.5038L7.94161 12.438C7.64474 12.2401 7.64474 11.8039 7.94161 11.606L15.5402 6.54025C15.8725 6.31873 16.3176 6.55693 16.3176 6.95628Z</PathGeometry>
<PathGeometry x:Key="ScrollBarRightGlyph">M9 17.0657V6.93425C9 6.5349 9.44507 6.29671 9.77735 6.51823L17.376 11.584C17.6728 11.7819 17.6728 12.2181 17.376 12.416L9.77735 17.4818C9.44507 17.7033 9 17.4651 9 17.0657Z</PathGeometry>
<PathGeometry x:Key="ScrollBarUpGlyph">M17.0839 16.3212H6.9524C6.55305 16.3212 6.31486 15.8761 6.53638 15.5438L11.6021 7.94521C11.8 7.64834 12.2363 7.64834 12.4342 7.94521L17.4999 15.5438C17.7214 15.8761 17.4832 16.3212 17.0839 16.3212Z</PathGeometry>
<PathGeometry x:Key="ScrollBarDownGlyph">M6.95249 7.72265L17.084 7.72265C17.4833 7.72265 17.7215 8.16772 17.5 8.5L12.4343 16.0986C12.2363 16.3955 11.8001 16.3955 11.6022 16.0986L6.53647 8.5C6.31495 8.16772 6.55315 7.72265 6.95249 7.72265Z</PathGeometry>
</ResourceDictionary> </ResourceDictionary>