Browse Source

Rename RegionBrush to SystemRegionColor and use it in default templates

pull/11097/head
Max Katz 3 years ago
parent
commit
bbbc1280ff
  1. 4
      src/Avalonia.Themes.Fluent/Accents/BaseColorsPalette.xaml
  2. 4
      src/Avalonia.Themes.Fluent/Accents/BaseResources.xaml
  3. 5
      src/Avalonia.Themes.Fluent/ColorPaletteResources.Properties.cs
  4. 2
      src/Avalonia.Themes.Fluent/Controls/EmbeddableControlRoot.xaml
  5. 2
      src/Avalonia.Themes.Fluent/Controls/Window.xaml

4
src/Avalonia.Themes.Fluent/Accents/BaseColorsPalette.xaml

@ -29,7 +29,7 @@
<Color x:Key="SystemListLowColor">#19000000</Color>
<Color x:Key="SystemListMediumColor">#33000000</Color>
<Color x:Key="SystemErrorTextColor">#C50500</Color>
<Color x:Key="RegionColor">#FFFFFFFF</Color>
<Color x:Key="SystemRegionColor">#FFFFFFFF</Color>
<Color x:Key="SystemRevealListLowColor">#17000000</Color>
<Color x:Key="SystemRevealListMediumColor">#2E000000</Color>
</ResourceDictionary>
@ -60,7 +60,7 @@
<Color x:Key="SystemListLowColor">#19FFFFFF</Color>
<Color x:Key="SystemListMediumColor">#33FFFFFF</Color>
<Color x:Key="SystemErrorTextColor">#FFF000</Color>
<Color x:Key="RegionColor">#FF000000</Color>
<Color x:Key="SystemRegionColor">#FF000000</Color>
<Color x:Key="SystemRevealListLowColor">#18FFFFFF</Color>
<Color x:Key="SystemRevealListMediumColor">#30FFFFFF</Color>
</ResourceDictionary>

4
src/Avalonia.Themes.Fluent/Accents/BaseResources.xaml

@ -212,7 +212,7 @@
<SolidColorBrush x:Key="SystemControlTransparentRevealBackgroundBrush" Color="Transparent" />
<SolidColorBrush x:Key="SystemControlTransparentRevealBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="RegionBrush" Color="{StaticResource RegionColor}" />
<SolidColorBrush x:Key="SystemRegionBrush" Color="{StaticResource SystemRegionColor}" />
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<SolidColorBrush x:Key="SystemControlBackgroundAccentBrush" Color="{DynamicResource SystemAccentColor}" />
@ -372,7 +372,7 @@
<SolidColorBrush x:Key="SystemControlTransparentRevealBackgroundBrush" Color="Transparent" />
<SolidColorBrush x:Key="SystemControlTransparentRevealBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="RegionBrush" Color="{StaticResource RegionColor}" />
<SolidColorBrush x:Key="SystemRegionBrush" Color="{StaticResource SystemRegionColor}" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

5
src/Avalonia.Themes.Fluent/ColorPaletteResources.Properties.cs

@ -150,4 +150,9 @@ public partial class ColorPaletteResources
/// Gets or sets the ListMedium color value.
/// </summary>
public Color ListMedium { get => GetColor("SystemListMediumColor"); set => SetColor("SystemListMediumColor", value); }
/// <summary>
/// Gets or sets the RegionColor color value.
/// </summary>
public Color RegionColor { get => GetColor("SystemRegionColor"); set => SetColor("SystemRegionColor", value); }
}

2
src/Avalonia.Themes.Fluent/Controls/EmbeddableControlRoot.xaml

@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ControlTheme x:Key="{x:Type EmbeddableControlRoot}" TargetType="EmbeddableControlRoot">
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/>
<Setter Property="Background" Value="{DynamicResource SystemControlBackgroundAltHighBrush}"/>
<Setter Property="Background" Value="{DynamicResource SystemRegionBrush}"/>
<Setter Property="TopLevel.SystemBarColor" Value="{DynamicResource SystemControlBackgroundAltHighBrush}"/>
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}"/>
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />

2
src/Avalonia.Themes.Fluent/Controls/Window.xaml

@ -1,7 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ControlTheme x:Key="{x:Type Window}" TargetType="Window">
<Setter Property="Background" Value="{DynamicResource SystemControlBackgroundAltHighBrush}"/>
<Setter Property="Background" Value="{DynamicResource SystemRegionBrush}"/>
<Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource SystemControlBackgroundAltHighBrush}" />
<Setter Property="TopLevel.SystemBarColor" Value="{DynamicResource SystemControlBackgroundAltHighBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}"/>

Loading…
Cancel
Save