mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-19 16:06:35 +08:00
feat: Add new index for theme. fix some minor issue.
This commit is contained in:
@@ -171,12 +171,12 @@
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Small">
|
||||
<Setter Property="RadioButton.FontSize" Value="{StaticResource RadioButtonButtonSmallFontSize}" />
|
||||
<Setter Property="RadioButton.Padding" Value="{StaticResource RadioButtonButtonSmallPadding}" />
|
||||
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonButtonSmallFontSize}" />
|
||||
<Setter Property="RadioButton.Padding" Value="{DynamicResource RadioButtonButtonSmallPadding}" />
|
||||
</Style>
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="RadioButton.FontSize" Value="{StaticResource RadioButtonButtonLargeFontSize}" />
|
||||
<Setter Property="RadioButton.Padding" Value="{StaticResource RadioButtonButtonLargePadding}" />
|
||||
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonButtonLargeFontSize}" />
|
||||
<Setter Property="RadioButton.Padding" Value="{DynamicResource RadioButtonButtonLargePadding}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
x:Name="PART_OffContentPresenter"
|
||||
Grid.Column="1"
|
||||
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
|
||||
HorizontalAlignment="Right"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Content="{TemplateBinding OffContent}"
|
||||
|
||||
@@ -16,4 +16,8 @@ Please don't update if you are not using Avalonia latest nightly build. </Packag
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-preview5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Themes\Styles" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<Styles.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Dark.axaml"/>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Base.axaml"/>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Controls.axaml"/>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Dark.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Base.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Controls.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Styles.Resources>
|
||||
<Style Selector=":is(UserControl)">
|
||||
<Setter Property="Theme" Value="{DynamicResource {x:Type UserControl}}"></Setter>
|
||||
<Setter Property="Theme" Value="{DynamicResource {x:Type UserControl}}" />
|
||||
</Style>
|
||||
</Styles>
|
||||
|
||||
18
src/Semi.Avalonia/Themes/Index.axaml
Normal file
18
src/Semi.Avalonia/Themes/Index.axaml
Normal file
@@ -0,0 +1,18 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Styles.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia/Themes/Light/Light.axaml" />
|
||||
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia/Themes/Dark/Dark.axaml" />
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Controls.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Base.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Styles.Resources>
|
||||
<Style Selector=":is(UserControl)">
|
||||
<Setter Property="Theme" Value="{DynamicResource {x:Type UserControl}}" />
|
||||
</Style>
|
||||
<!-- Add Styles Here -->
|
||||
</Styles>
|
||||
Reference in New Issue
Block a user