mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-05-02 14:01:28 +08:00
feat: extract color resources.
This commit is contained in:
@@ -58,7 +58,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Border#PART_BorderSeparator">
|
<Style Selector="^ /template/ Border#PART_BorderSeparator">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorBorder}" />
|
<Setter Property="Background" Value="{DynamicResource TabControlSeparatorBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^[TabStripPlacement=Top] /template/ Border#PART_BorderSeparator">
|
<Style Selector="^[TabStripPlacement=Top] /template/ Border#PART_BorderSeparator">
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Border#PART_BorderSeparator">
|
<Style Selector="^ /template/ Border#PART_BorderSeparator">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorBorder}" />
|
<Setter Property="Background" Value="{DynamicResource TabControlSeparatorBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]">
|
<Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]">
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]">
|
<Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]">
|
||||||
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorPrimaryLight}" />
|
<Setter Property="Background" Value="{DynamicResource TabItemLineHeaderSelectedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -114,10 +114,10 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]">
|
<Style Selector="^[TabStripPlacement=Left], ^[TabStripPlacement=Right]">
|
||||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill0}" />
|
<Setter Property="Background" Value="{DynamicResource TabItemLineHeaderPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill1}" />
|
<Setter Property="Background" Value="{DynamicResource TabItemLineHeaderPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -147,18 +147,18 @@
|
|||||||
BasedOn="{StaticResource BaseTabItem}"
|
BasedOn="{StaticResource BaseTabItem}"
|
||||||
TargetType="TabItem">
|
TargetType="TabItem">
|
||||||
<Setter Property="Padding" Value="12 8" />
|
<Setter Property="Padding" Value="12 8" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource SemiColorBorder}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource TabControlSeparatorBorderBrush}" />
|
||||||
|
|
||||||
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorBackground0}" />
|
<Setter Property="Background" Value="{DynamicResource TabItemCardHeaderSelectedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:not(:selected)">
|
<Style Selector="^:not(:selected)">
|
||||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill0}" />
|
<Setter Property="Background" Value="{DynamicResource TabItemCardHeaderPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill1}" />
|
<Setter Property="Background" Value="{DynamicResource TabItemCardHeaderPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@@ -201,16 +201,16 @@
|
|||||||
<Setter Property="CornerRadius" Value="{DynamicResource SemiBorderRadiusSmall}" />
|
<Setter Property="CornerRadius" Value="{DynamicResource SemiBorderRadiusSmall}" />
|
||||||
|
|
||||||
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource SemiColorPrimary}" />
|
<Setter Property="Foreground" Value="{DynamicResource TabItemButtonHeaderSelectedForeground}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorPrimaryLight}" />
|
<Setter Property="Background" Value="{DynamicResource TabItemButtonHeaderSelectedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:not(:selected)">
|
<Style Selector="^:not(:selected)">
|
||||||
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
<Style Selector="^:pointerover /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill0}" />
|
<Setter Property="Background" Value="{DynamicResource TabItemButtonHeaderPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
<Style Selector="^:pressed /template/ ContentPresenter#PART_HeaderPresenter">
|
||||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill1}" />
|
<Setter Property="Background" Value="{DynamicResource TabItemButtonHeaderPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
<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">
|
||||||
|
<StaticResource x:Key="TabControlSeparatorBorderBrush" ResourceKey="SemiColorBorder" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -7,4 +7,16 @@
|
|||||||
<StaticResource x:Key="TabItemLineHeaderForeground" ResourceKey="SemiColorText2" />
|
<StaticResource x:Key="TabItemLineHeaderForeground" ResourceKey="SemiColorText2" />
|
||||||
<StaticResource x:Key="TabItemLineHeaderPointeroverForeground" ResourceKey="SemiColorText0" />
|
<StaticResource x:Key="TabItemLineHeaderPointeroverForeground" ResourceKey="SemiColorText0" />
|
||||||
<StaticResource x:Key="TabItemLineHeaderSelectedForeground" ResourceKey="SemiColorText0" />
|
<StaticResource x:Key="TabItemLineHeaderSelectedForeground" ResourceKey="SemiColorText0" />
|
||||||
|
<StaticResource x:Key="TabItemLineHeaderSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||||
|
<StaticResource x:Key="TabItemLineHeaderPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||||
|
<StaticResource x:Key="TabItemLineHeaderPressedBackground" ResourceKey="SemiColorFill1" />
|
||||||
|
<!-- Card -->
|
||||||
|
<StaticResource x:Key="TabItemCardHeaderSelectedBackground" ResourceKey="SemiColorBackground0" />
|
||||||
|
<StaticResource x:Key="TabItemCardHeaderPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||||
|
<StaticResource x:Key="TabItemCardHeaderPressedBackground" ResourceKey="SemiColorFill1" />
|
||||||
|
<!-- Button -->
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderSelectedForeground" ResourceKey="SemiColorPrimary" />
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderPressedBackground" ResourceKey="SemiColorFill1" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
<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">
|
||||||
|
<StaticResource x:Key="TabControlSeparatorBorderBrush" ResourceKey="SemiColorWindowText" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -7,4 +7,16 @@
|
|||||||
<StaticResource x:Key="TabItemLineHeaderForeground" ResourceKey="SemiColorWindowText" />
|
<StaticResource x:Key="TabItemLineHeaderForeground" ResourceKey="SemiColorWindowText" />
|
||||||
<StaticResource x:Key="TabItemLineHeaderPointeroverForeground" ResourceKey="SemiColorWindowText" />
|
<StaticResource x:Key="TabItemLineHeaderPointeroverForeground" ResourceKey="SemiColorWindowText" />
|
||||||
<StaticResource x:Key="TabItemLineHeaderSelectedForeground" ResourceKey="SemiColorWindowText" />
|
<StaticResource x:Key="TabItemLineHeaderSelectedForeground" ResourceKey="SemiColorWindowText" />
|
||||||
|
<StaticResource x:Key="TabItemLineHeaderSelectedBackground" ResourceKey="SemiColorWindow" />
|
||||||
|
<StaticResource x:Key="TabItemLineHeaderPointeroverBackground" ResourceKey="SemiColorHighlightText" />
|
||||||
|
<StaticResource x:Key="TabItemLineHeaderPressedBackground" ResourceKey="SemiColorHighlightText" />
|
||||||
|
<!-- Card -->
|
||||||
|
<StaticResource x:Key="TabItemCardHeaderSelectedBackground" ResourceKey="SemiColorHighlight" />
|
||||||
|
<StaticResource x:Key="TabItemCardHeaderPointeroverBackground" ResourceKey="SemiColorHighlightText" />
|
||||||
|
<StaticResource x:Key="TabItemCardHeaderPressedBackground" ResourceKey="SemiColorHighlightText" />
|
||||||
|
<!-- Button -->
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderSelectedForeground" ResourceKey="SemiColorHighlight" />
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderSelectedBackground" ResourceKey="SemiColorHighlightText" />
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderPointeroverBackground" ResourceKey="SemiColorHighlightText" />
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderPressedBackground" ResourceKey="SemiColorHighlightText" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
<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">
|
||||||
|
<StaticResource x:Key="TabControlSeparatorBorderBrush" ResourceKey="SemiColorBorder" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -7,4 +7,16 @@
|
|||||||
<StaticResource x:Key="TabItemLineHeaderForeground" ResourceKey="SemiColorText2" />
|
<StaticResource x:Key="TabItemLineHeaderForeground" ResourceKey="SemiColorText2" />
|
||||||
<StaticResource x:Key="TabItemLineHeaderPointeroverForeground" ResourceKey="SemiColorText0" />
|
<StaticResource x:Key="TabItemLineHeaderPointeroverForeground" ResourceKey="SemiColorText0" />
|
||||||
<StaticResource x:Key="TabItemLineHeaderSelectedForeground" ResourceKey="SemiColorText0" />
|
<StaticResource x:Key="TabItemLineHeaderSelectedForeground" ResourceKey="SemiColorText0" />
|
||||||
|
<StaticResource x:Key="TabItemLineHeaderSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||||
|
<StaticResource x:Key="TabItemLineHeaderPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||||
|
<StaticResource x:Key="TabItemLineHeaderPressedBackground" ResourceKey="SemiColorFill1" />
|
||||||
|
<!-- Card -->
|
||||||
|
<StaticResource x:Key="TabItemCardHeaderSelectedBackground" ResourceKey="SemiColorBackground0" />
|
||||||
|
<StaticResource x:Key="TabItemCardHeaderPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||||
|
<StaticResource x:Key="TabItemCardHeaderPressedBackground" ResourceKey="SemiColorFill1" />
|
||||||
|
<!-- Button -->
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderSelectedForeground" ResourceKey="SemiColorPrimary" />
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderSelectedBackground" ResourceKey="SemiColorPrimaryLight" />
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderPointeroverBackground" ResourceKey="SemiColorFill0" />
|
||||||
|
<StaticResource x:Key="TabItemButtonHeaderPressedBackground" ResourceKey="SemiColorFill1" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Reference in New Issue
Block a user