feat: enhance Anchor styles.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
Name="PART_Pipe"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{DynamicResource SemiColorBorder}" />
|
||||
Fill="{DynamicResource AnchorPipeBackground}" />
|
||||
<ItemsPresenter
|
||||
Name="PART_ItemsPresenter"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
@@ -36,7 +36,7 @@
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="u:AnchorItem">
|
||||
<StackPanel>
|
||||
<Panel Background="{TemplateBinding Background}" >
|
||||
<Panel Background="{TemplateBinding Background}">
|
||||
<Border
|
||||
Name="PART_Pipe"
|
||||
Width="2"
|
||||
@@ -47,7 +47,7 @@
|
||||
<ContentPresenter
|
||||
Name="{x:Static iri:PartNames.PART_HeaderPresenter}"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource SemiColorText2}"
|
||||
Foreground="{DynamicResource AnchorForeground}"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}">
|
||||
<ContentPresenter.Margin>
|
||||
@@ -68,19 +68,24 @@
|
||||
</Style>
|
||||
<Style Selector="^.Small /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AnchorSmallHeight}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource SemiFontSizeSmall}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource AnchorSmallFontSize}" />
|
||||
</Style>
|
||||
<Style Selector="^:selected /template/ Border#PART_Pipe">
|
||||
<Setter Property="Background" Value="{DynamicResource SemiColorTertiary}" />
|
||||
</Style>
|
||||
<Style Selector="^.Primary:selected /template/ Border#PART_Pipe">
|
||||
<Setter Property="Background" Value="{DynamicResource SemiColorPrimary}" />
|
||||
</Style>
|
||||
<Style Selector="^.Mute:selected /template/ Border#PART_Pipe">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource SemiColorText0}" />
|
||||
<Style Selector="^:selected">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AnchorSelectedForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#PART_Pipe">
|
||||
<Setter Property="Background" Value="{DynamicResource AnchorPipeSelectedBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Primary /template/ Border#PART_Pipe">
|
||||
<Setter Property="Background" Value="{DynamicResource AnchorPipeSelectedPrimaryBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Tertiary /template/ Border#PART_Pipe">
|
||||
<Setter Property="Background" Value="{DynamicResource AnchorPipeSelectedTertiaryBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^.Mute /template/ Border#PART_Pipe">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
|
||||
8
src/Ursa.Themes.Semi/Themes/Dark/Anchor.axaml
Normal file
8
src/Ursa.Themes.Semi/Themes/Dark/Anchor.axaml
Normal file
@@ -0,0 +1,8 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="AnchorPipeBackground" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="AnchorForeground" ResourceKey="SemiColorText2" />
|
||||
<StaticResource x:Key="AnchorSelectedForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="AnchorPipeSelectedBackground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="AnchorPipeSelectedPrimaryBackground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="AnchorPipeSelectedTertiaryBackground" ResourceKey="SemiColorTertiary" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +1,7 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="Avatar.axaml" />
|
||||
<ResourceInclude Source="Anchor.axaml" />
|
||||
<ResourceInclude Source="Badge.axaml" />
|
||||
<ResourceInclude Source="Banner.axaml" />
|
||||
<ResourceInclude Source="Breadcrumb.axaml" />
|
||||
|
||||
7
src/Ursa.Themes.Semi/Themes/HighContrast/Anchor.axaml
Normal file
7
src/Ursa.Themes.Semi/Themes/HighContrast/Anchor.axaml
Normal file
@@ -0,0 +1,7 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="AnchorPipeBackground" ResourceKey="GrayTextColor" />
|
||||
<StaticResource x:Key="AnchorForeground" ResourceKey="WindowTextColor" />
|
||||
<StaticResource x:Key="AnchorSelectedForeground" ResourceKey="HotlightColor" />
|
||||
<StaticResource x:Key="AnchorPipeSelectedBackground" ResourceKey="HotlightColor" />
|
||||
<StaticResource x:Key="AnchorPipeSelectedPrimaryBackground" ResourceKey="HotlightColor" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,5 +1,6 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="Anchor.axaml" />
|
||||
<ResourceInclude Source="Badge.axaml" />
|
||||
<ResourceInclude Source="Banner.axaml" />
|
||||
<ResourceInclude Source="Breadcrumb.axaml" />
|
||||
|
||||
8
src/Ursa.Themes.Semi/Themes/Light/Anchor.axaml
Normal file
8
src/Ursa.Themes.Semi/Themes/Light/Anchor.axaml
Normal file
@@ -0,0 +1,8 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StaticResource x:Key="AnchorPipeBackground" ResourceKey="SemiColorBorder" />
|
||||
<StaticResource x:Key="AnchorForeground" ResourceKey="SemiColorText2" />
|
||||
<StaticResource x:Key="AnchorSelectedForeground" ResourceKey="SemiColorText0" />
|
||||
<StaticResource x:Key="AnchorPipeSelectedBackground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="AnchorPipeSelectedPrimaryBackground" ResourceKey="SemiColorPrimary" />
|
||||
<StaticResource x:Key="AnchorPipeSelectedTertiaryBackground" ResourceKey="SemiColorTertiary" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +1,7 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="Avatar.axaml" />
|
||||
<ResourceInclude Source="Anchor.axaml" />
|
||||
<ResourceInclude Source="Badge.axaml" />
|
||||
<ResourceInclude Source="Banner.axaml" />
|
||||
<ResourceInclude Source="Breadcrumb.axaml" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<x:Double x:Key="AnchorIndent">12</x:Double>
|
||||
<x:Double x:Key="AnchorDefaultHeight">20</x:Double>
|
||||
<x:Double x:Key="AnchorSmallHeight">16</x:Double>
|
||||
<StaticResource x:Key="AnchorSmallFontSize" ResourceKey="SemiFontSizeSmall"/>
|
||||
</ResourceDictionary>
|
||||
|
||||
Reference in New Issue
Block a user