From 0413fe944ff4d81a84cb49b0f656bb765d98ed22 Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Tue, 16 Mar 2021 15:32:43 +0100 Subject: [PATCH] Updated accent color (#10257) Co-authored-by: Niels Laute --- .../editor/FancyZonesEditor/GridZone.xaml.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/GridZone.xaml.cs b/src/modules/fancyzones/editor/FancyZonesEditor/GridZone.xaml.cs index c8eca9dbd8..09901e9dc3 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/GridZone.xaml.cs +++ b/src/modules/fancyzones/editor/FancyZonesEditor/GridZone.xaml.cs @@ -21,6 +21,7 @@ namespace FancyZonesEditor private const string ObjectDependencyID = "IsSelected"; private const string GridZoneBackgroundBrushID = "GridZoneBackgroundBrush"; private const string SecondaryForegroundBrushID = "SecondaryForegroundBrush"; + private const string AccentColorBrushID = "SystemControlBackgroundAccentBrush"; public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(ObjectDependencyID, typeof(bool), typeof(GridZone), new PropertyMetadata(false, OnSelectionChanged)); @@ -50,7 +51,7 @@ namespace FancyZonesEditor private void OnSelectionChanged() { - Background = IsSelected ? SystemParameters.WindowGlassBrush : App.Current.Resources[GridZoneBackgroundBrushID] as SolidColorBrush; + Background = IsSelected ? Application.Current.Resources[AccentColorBrushID] as SolidColorBrush : Application.Current.Resources[GridZoneBackgroundBrushID] as SolidColorBrush; } public bool IsSelected @@ -65,7 +66,7 @@ namespace FancyZonesEditor OnSelectionChanged(); _splitter = new Rectangle { - Fill = SystemParameters.WindowGlassBrush, + Fill = Application.Current.Resources[AccentColorBrushID] as SolidColorBrush, }; Body.Children.Add(_splitter); @@ -139,8 +140,8 @@ namespace FancyZonesEditor enabled = _canSplit(Orientation.Horizontal, _snappedPositionY); } - Brush disabledBrush = App.Current.Resources[SecondaryForegroundBrushID] as SolidColorBrush; - Brush enabledBrush = SystemParameters.WindowGlassBrush; // Active Accent color + Brush disabledBrush = Application.Current.Resources[SecondaryForegroundBrushID] as SolidColorBrush; + Brush enabledBrush = Application.Current.Resources[AccentColorBrushID] as SolidColorBrush; _splitter.Fill = enabled ? enabledBrush : disabledBrush; } @@ -148,7 +149,7 @@ namespace FancyZonesEditor { _hovering = true; UpdateSplitter(); - _splitter.Fill = SystemParameters.WindowGlassBrush; + _splitter.Fill = Application.Current.Resources[AccentColorBrushID] as SolidColorBrush; } protected override void OnMouseLeave(MouseEventArgs e)