diff --git a/src/core/Microsoft.PowerToys.Settings.UI/App.xaml b/src/core/Microsoft.PowerToys.Settings.UI/App.xaml index 6d94ab97eb..ed95d11c6d 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/App.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/App.xaml @@ -17,6 +17,13 @@ + + + #66FFFFFF + #FFFFFFFF + + #66000000 + #FF000000 \ No newline at end of file diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Converters/ModuleEnabledToForegroundConverter.cs b/src/core/Microsoft.PowerToys.Settings.UI/Converters/ModuleEnabledToForegroundConverter.cs index 56709d31d7..3b6f94326f 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Converters/ModuleEnabledToForegroundConverter.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI/Converters/ModuleEnabledToForegroundConverter.cs @@ -1,7 +1,4 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - +using Microsoft.PowerToys.Settings.UI.Lib; using System; using Windows.UI; using Windows.UI.Xaml; @@ -15,13 +12,36 @@ namespace Microsoft.PowerToys.Settings.UI.Converters public object Convert(object value, Type targetType, object parameter, string language) { bool isEnabled = (bool)value; - if (isEnabled) + GeneralSettings generalSettings = SettingsUtils.GetSettings(string.Empty); + + var defaultTheme = new Windows.UI.ViewManagement.UISettings(); + var uiTheme = defaultTheme.GetColorValue(Windows.UI.ViewManagement.UIColorType.Background).ToString(); + + string selectedTheme = generalSettings.Theme.ToLower(); + + if (selectedTheme == "dark" || (selectedTheme == "system" && uiTheme == "#FF000000")) { - return new SolidColorBrush((Color)Application.Current.Resources["SystemBaseHighColor"]); + // DARK + if (isEnabled) + { + return (SolidColorBrush)Application.Current.Resources["DarkForegroundBrush"]; + } + else + { + return (SolidColorBrush)Application.Current.Resources["DarkForegroundDisabledBrush"]; + } } else { - return (SolidColorBrush)Application.Current.Resources["SystemControlDisabledBaseMediumLowBrush"]; + // LIGHT + if (isEnabled) + { + return (SolidColorBrush)Application.Current.Resources["LightForegroundBrush"]; + } + else + { + return (SolidColorBrush)Application.Current.Resources["LightForegroundDisabledBrush"]; + } } }