Browse Source

Remap Expander resources to Fluent v1 base resources

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

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

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

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

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

Loading…
Cancel
Save