Browse Source

Remap Expander resources to Fluent v1 base resources

pull/9270/head
robloo 3 years ago
parent
commit
830587fc28
  1. 44
      src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml
  2. 42
      src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml
  3. 14
      src/Avalonia.Themes.Fluent/Controls/Expander.xaml

44
src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml

@ -307,31 +307,29 @@
<!-- Resources for Expander.xaml -->
<!-- Expander:Header -->
<StaticResource x:Key="ExpanderHeaderBackground" ResourceKey="CardBackgroundFillColorDefaultBrush" />
<StaticResource x:Key="ExpanderHeaderForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderHeaderForegroundPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderHeaderForegroundPressed" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderHeaderBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<StaticResource x:Key="ExpanderHeaderBorderPointerOverBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<StaticResource x:Key="ExpanderHeaderBorderPressedBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<StaticResource x:Key="ExpanderHeaderDisabledForeground" ResourceKey="TextFillColorDisabledBrush" />
<StaticResource x:Key="ExpanderHeaderDisabledBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<Thickness x:Key="ExpanderHeaderBorderThickness">1</Thickness>
<StaticResource x:Key="ExpanderChevronBackground" ResourceKey="SubtleFillColorTransparentBrush" />
<StaticResource x:Key="ExpanderChevronPointerOverBackground" ResourceKey="SubtleFillColorSecondaryBrush" />
<StaticResource x:Key="ExpanderChevronPressedBackground" ResourceKey="SubtleFillColorTertiaryBrush" />
<StaticResource x:Key="ExpanderChevronForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderChevronPointerOverForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderChevronPressedForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderChevronBorderBrush" ResourceKey="SubtleFillColorTransparentBrush" />
<StaticResource x:Key="ExpanderChevronBorderPointerOverBrush" ResourceKey="SubtleFillColorTransparentBrush" />
<StaticResource x:Key="ExpanderChevronBorderPressedBrush" ResourceKey="SubtleFillColorTransparentBrush" />
<Thickness x:Key="ExpanderChevronBorderThickness">0</Thickness>
<StaticResource x:Key="ExpanderHeaderBackground" ResourceKey="SystemAltMediumHighColor" />
<StaticResource x:Key="ExpanderHeaderForeground" ResourceKey="SystemBaseHighColor" />
<StaticResource x:Key="ExpanderHeaderForegroundPointerOver" ResourceKey="SystemBaseHighColor" />
<StaticResource x:Key="ExpanderHeaderForegroundPressed" ResourceKey="SystemBaseHighColor" />
<StaticResource x:Key="ExpanderHeaderBorderBrush" ResourceKey="SystemBaseLowColor" />
<StaticResource x:Key="ExpanderHeaderBorderPointerOverBrush" ResourceKey="SystemBaseLowColor" />
<StaticResource x:Key="ExpanderHeaderBorderPressedBrush" ResourceKey="SystemBaseLowColor" />
<StaticResource x:Key="ExpanderHeaderDisabledForeground" ResourceKey="SystemControlDisabledChromeDisabledLowBrush" />
<StaticResource x:Key="ExpanderHeaderDisabledBorderBrush" ResourceKey="SystemControlDisabledBaseLowBrush" />
<SolidColorBrush x:Key="ExpanderChevronBackground" Color="Transparent" />
<SolidColorBrush x:Key="ExpanderChevronPointerOverBackground" Color="Transparent" />
<SolidColorBrush x:Key="ExpanderChevronPressedBackground" Color="Transparent" />
<StaticResource x:Key="ExpanderChevronForeground" ResourceKey="SystemBaseHighColor" />
<StaticResource x:Key="ExpanderChevronPointerOverForeground" ResourceKey="SystemBaseHighColor" />
<StaticResource x:Key="ExpanderChevronPressedForeground" ResourceKey="SystemBaseHighColor" />
<SolidColorBrush x:Key="ExpanderChevronBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ExpanderChevronBorderPointerOverBrush" Color="Transparent" />
<SolidColorBrush x:Key="ExpanderChevronBorderPressedBrush" Color="Transparent" />
<!-- Expander:Content -->
<StaticResource x:Key="ExpanderContentBackground" ResourceKey="CardBackgroundFillColorSecondaryBrush" />
<StaticResource x:Key="ExpanderContentBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<StaticResource x:Key="ExpanderContentBackground" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="ExpanderContentBorderBrush" ResourceKey="SystemBaseLowColor" />
<!--Resources for NotificationCard.xaml -->
<SolidColorBrush x:Key="NotificationCardBackgroundBrush" Color="#444444" />

42
src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml

@ -304,31 +304,29 @@
<!-- Resources for Expander.xaml -->
<!-- Expander:Header -->
<StaticResource x:Key="ExpanderHeaderBackground" ResourceKey="CardBackgroundFillColorDefaultBrush" />
<StaticResource x:Key="ExpanderHeaderForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderHeaderForegroundPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderHeaderForegroundPressed" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderHeaderBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<StaticResource x:Key="ExpanderHeaderBorderPointerOverBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<StaticResource x:Key="ExpanderHeaderBorderPressedBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<StaticResource x:Key="ExpanderHeaderDisabledForeground" ResourceKey="TextFillColorDisabledBrush" />
<StaticResource x:Key="ExpanderHeaderDisabledBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<Thickness x:Key="ExpanderHeaderBorderThickness">1</Thickness>
<StaticResource x:Key="ExpanderHeaderBackground" ResourceKey="SystemAltMediumHighColor" />
<StaticResource x:Key="ExpanderHeaderForeground" ResourceKey="SystemBaseHighColor" />
<StaticResource x:Key="ExpanderHeaderForegroundPointerOver" ResourceKey="SystemBaseHighColor" />
<StaticResource x:Key="ExpanderHeaderForegroundPressed" ResourceKey="SystemBaseHighColor" />
<StaticResource x:Key="ExpanderHeaderBorderBrush" ResourceKey="SystemBaseLowColor" />
<StaticResource x:Key="ExpanderHeaderBorderPointerOverBrush" ResourceKey="SystemBaseLowColor" />
<StaticResource x:Key="ExpanderHeaderBorderPressedBrush" ResourceKey="SystemBaseLowColor" />
<StaticResource x:Key="ExpanderHeaderDisabledForeground" ResourceKey="SystemControlDisabledChromeDisabledLowBrush" />
<StaticResource x:Key="ExpanderHeaderDisabledBorderBrush" ResourceKey="SystemControlDisabledBaseLowBrush" />
<StaticResource x:Key="ExpanderChevronBackground" ResourceKey="SubtleFillColorTransparentBrush" />
<StaticResource x:Key="ExpanderChevronPointerOverBackground" ResourceKey="SubtleFillColorSecondaryBrush" />
<StaticResource x:Key="ExpanderChevronPressedBackground" ResourceKey="SubtleFillColorTertiaryBrush" />
<StaticResource x:Key="ExpanderChevronForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderChevronPointerOverForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderChevronPressedForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="ExpanderChevronBorderBrush" ResourceKey="SubtleFillColorTransparentBrush" />
<StaticResource x:Key="ExpanderChevronBorderPointerOverBrush" ResourceKey="SubtleFillColorTransparentBrush" />
<StaticResource x:Key="ExpanderChevronBorderPressedBrush" ResourceKey="SubtleFillColorTransparentBrush" />
<Thickness x:Key="ExpanderChevronBorderThickness">0</Thickness>
<SolidColorBrush x:Key="ExpanderChevronBackground" Color="Transparent" />
<SolidColorBrush x:Key="ExpanderChevronPointerOverBackground" Color="Transparent" />
<SolidColorBrush x:Key="ExpanderChevronPressedBackground" Color="Transparent" />
<StaticResource x:Key="ExpanderChevronForeground" ResourceKey="SystemBaseHighColor" />
<StaticResource x:Key="ExpanderChevronPointerOverForeground" ResourceKey="SystemBaseHighColor" />
<StaticResource x:Key="ExpanderChevronPressedForeground" ResourceKey="SystemBaseHighColor" />
<SolidColorBrush x:Key="ExpanderChevronBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ExpanderChevronBorderPointerOverBrush" Color="Transparent" />
<SolidColorBrush x:Key="ExpanderChevronBorderPressedBrush" Color="Transparent" />
<!-- Expander:Content -->
<StaticResource x:Key="ExpanderContentBackground" ResourceKey="CardBackgroundFillColorSecondaryBrush" />
<StaticResource x:Key="ExpanderContentBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
<StaticResource x:Key="ExpanderContentBackground" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="ExpanderContentBorderBrush" ResourceKey="SystemBaseLowColor" />
<!--Resources for NotificationCard.xaml -->
<SolidColorBrush x:Key="NotificationCardBackgroundBrush" Color="White" />

14
src/Avalonia.Themes.Fluent/Controls/Expander.xaml

@ -52,14 +52,18 @@
<HorizontalAlignment x:Key="ExpanderHeaderHorizontalContentAlignment">Stretch</HorizontalAlignment>
<VerticalAlignment x:Key="ExpanderHeaderVerticalContentAlignment">Center</VerticalAlignment>
<Thickness x:Key="ExpanderHeaderPadding">16,0,0,0</Thickness>
<Thickness x:Key="ExpanderHeaderBorderThickness">1</Thickness>
<Thickness x:Key="ExpanderChevronBorderThickness">0</Thickness>
<Thickness x:Key="ExpanderChevronMargin">20,0,8,0</Thickness>
<x:Double x:Key="ExpanderChevronButtonSize">32</x:Double>
<x:Double x:Key="ExpanderChevronGlyphSize">12</x:Double>
<!-- Content -->
<Thickness x:Key="ExpanderContentPadding">16</Thickness>
<Thickness x:Key="ExpanderContentDownBorderThickness">1,0,1,1</Thickness>
<Thickness x:Key="ExpanderContentLeftBorderThickness">1,1,0,1</Thickness>
<Thickness x:Key="ExpanderContentUpBorderThickness">1,1,1,0</Thickness>
<Thickness x:Key="ExpanderContentRightBorderThickness">0,1,1,1</Thickness>
<Thickness x:Key="ExpanderContentDownBorderThickness">1,0,1,1</Thickness>
<ControlTheme x:Key="FluentExpanderToggleButtonTheme" TargetType="ToggleButton">
<Setter Property="Padding" Value="{StaticResource ExpanderHeaderPadding}"/>
@ -274,16 +278,16 @@
</Style>
<Style Selector="^:left /template/ Border#ExpanderContent">
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderDropdownLeftBorderThickness}" />
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderContentLeftBorderThickness}" />
</Style>
<Style Selector="^:up /template/ Border#ExpanderContent">
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderDropdownUpBorderThickness}" />
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderContentUpBorderThickness}" />
</Style>
<Style Selector="^:right /template/ Border#ExpanderContent">
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderDropdownRightBorderThickness}" />
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderContentRightBorderThickness}" />
</Style>
<Style Selector="^:down /template/ Border#ExpanderContent">
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderDropdownDownBorderThickness}" />
<Setter Property="BorderThickness" Value="{DynamicResource ExpanderContentDownBorderThickness}" />
</Style>
</ControlTheme>
</ResourceDictionary>

Loading…
Cancel
Save