From 109aeb49e4d380ce029a33b36ebd51c97ceb6764 Mon Sep 17 00:00:00 2001 From: mp-bw <59324545+mp-bw@users.noreply.github.com> Date: Tue, 21 Jun 2022 14:59:30 -0400 Subject: [PATCH] [BEEEP] [PS-940] Support for dark theme selection while using Default (System) theme (#1959) * support for dark theme selection while using Default (System) theme * refinements --- src/Android/Utilities/ThemeHelpers.cs | 4 +- src/App/Pages/Settings/OptionsPage.xaml | 17 + src/App/Pages/Settings/OptionsPage.xaml.cs | 2 + .../Pages/Settings/OptionsPageViewModel.cs | 52 +- src/App/Resources/AppResources.Designer.cs | 9151 +++++++---------- src/App/Resources/AppResources.resx | 10 + src/App/Utilities/ThemeManager.cs | 37 +- src/Core/Abstractions/IStateService.cs | 2 + src/Core/Constants.cs | 1 + src/Core/Services/StateService.cs | 22 + src/iOS.Core/Utilities/ThemeHelpers.cs | 4 +- 11 files changed, 3710 insertions(+), 5592 deletions(-) diff --git a/src/Android/Utilities/ThemeHelpers.cs b/src/Android/Utilities/ThemeHelpers.cs index b33aabc53..fa3bf4134 100644 --- a/src/Android/Utilities/ThemeHelpers.cs +++ b/src/Android/Utilities/ThemeHelpers.cs @@ -59,10 +59,10 @@ namespace Bit.Droid.Utilities { if (string.IsNullOrWhiteSpace(theme) && osDarkModeEnabled) { - theme = "dark"; + theme = ThemeManager.Dark; } - if (theme == "dark" || theme == "black" || theme == "nord") + if (theme == ThemeManager.Dark || theme == ThemeManager.Black || theme == ThemeManager.Nord) { LightTheme = false; } diff --git a/src/App/Pages/Settings/OptionsPage.xaml b/src/App/Pages/Settings/OptionsPage.xaml index bbfb380ab..8d37074c6 100644 --- a/src/App/Pages/Settings/OptionsPage.xaml +++ b/src/App/Pages/Settings/OptionsPage.xaml @@ -33,6 +33,23 @@ StyleClass="box-footer-label" Text="{u:I18n ThemeDescription}" /> + + + +