From 458003347793eaff7a3a423e676923df5c7fa4ec Mon Sep 17 00:00:00 2001 From: aj-rosado <109146700+aj-rosado@users.noreply.github.com> Date: Fri, 2 Dec 2022 16:38:25 +0000 Subject: [PATCH] [PS-1707] improve dark layout colors (#2209) * [PS-1707] Changed the callout color to a Theme Color * [PS-1707] Changed color defaults to defined colors * [PS-1707] Added an effect to change the switch hint color to a theme color * [PS-1707] Removed HintColorSwitchEffect and added the content to the CustomSwitchRenderer to affect all switches and update on theme change --- src/Android/Renderers/CustomSwitchRenderer.cs | 1 + src/Android/Utilities/ThemeHelpers.cs | 2 +- src/App/Controls/CircularProgressbarView.cs | 6 +++--- src/App/Controls/ExtendedSlider.cs | 2 +- src/App/Controls/ExtendedStepper.cs | 4 ++-- src/App/Pages/Accounts/SetPasswordPage.xaml | 4 ++-- src/App/Pages/Accounts/UpdateTempPasswordPage.xaml | 4 ++-- src/App/Pages/Generator/GeneratorPage.xaml | 4 ++-- src/App/Pages/Send/SendAddEditPage.xaml | 4 ++-- src/App/Pages/Send/SendAddOnlyPage.xaml | 4 ++-- src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml | 2 +- src/App/Pages/Settings/ExportVaultPage.xaml | 2 +- src/App/Pages/Settings/SettingsPage/SettingsPage.xaml | 4 ++-- src/App/Pages/Vault/CipherAddEditPage.xaml | 2 +- 14 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/Android/Renderers/CustomSwitchRenderer.cs b/src/Android/Renderers/CustomSwitchRenderer.cs index 00caa6290..f937b6e77 100644 --- a/src/Android/Renderers/CustomSwitchRenderer.cs +++ b/src/Android/Renderers/CustomSwitchRenderer.cs @@ -44,6 +44,7 @@ namespace Bit.Droid.Renderers } if (Control != null) { + Control.SetHintTextColor(ThemeHelpers.MutedColor); var t = ResourcesCompat.GetDrawable(Resources, Resource.Drawable.switch_thumb, null); if (t is GradientDrawable thumb) { diff --git a/src/Android/Utilities/ThemeHelpers.cs b/src/Android/Utilities/ThemeHelpers.cs index fa3bf4134..dafb60860 100644 --- a/src/Android/Utilities/ThemeHelpers.cs +++ b/src/Android/Utilities/ThemeHelpers.cs @@ -62,7 +62,7 @@ namespace Bit.Droid.Utilities theme = ThemeManager.Dark; } - if (theme == ThemeManager.Dark || theme == ThemeManager.Black || theme == ThemeManager.Nord) + if (theme == ThemeManager.Dark || theme == ThemeManager.Black || theme == ThemeManager.Nord || theme == ThemeManager.SolarizedDark) { LightTheme = false; } diff --git a/src/App/Controls/CircularProgressbarView.cs b/src/App/Controls/CircularProgressbarView.cs index 56e8a6c43..80c4447a6 100644 --- a/src/App/Controls/CircularProgressbarView.cs +++ b/src/App/Controls/CircularProgressbarView.cs @@ -21,13 +21,13 @@ namespace Bit.App.Controls nameof(StrokeWidth), typeof(float), typeof(CircularProgressbarView), 3f); public static readonly BindableProperty ProgressColorProperty = BindableProperty.Create( - nameof(ProgressColor), typeof(Color), typeof(CircularProgressbarView), Color.Default); + nameof(ProgressColor), typeof(Color), typeof(CircularProgressbarView), Color.FromHex("175DDC")); public static readonly BindableProperty EndingProgressColorProperty = BindableProperty.Create( - nameof(EndingProgressColor), typeof(Color), typeof(CircularProgressbarView), Color.Default); + nameof(EndingProgressColor), typeof(Color), typeof(CircularProgressbarView), Color.FromHex("dd4b39")); public static readonly BindableProperty BackgroundProgressColorProperty = BindableProperty.Create( - nameof(BackgroundProgressColor), typeof(Color), typeof(CircularProgressbarView), Color.Default); + nameof(BackgroundProgressColor), typeof(Color), typeof(CircularProgressbarView), Color.White); public double Progress { diff --git a/src/App/Controls/ExtendedSlider.cs b/src/App/Controls/ExtendedSlider.cs index 7d673fab9..b14acce93 100644 --- a/src/App/Controls/ExtendedSlider.cs +++ b/src/App/Controls/ExtendedSlider.cs @@ -5,7 +5,7 @@ namespace Bit.App.Controls public class ExtendedSlider : Slider { public static readonly BindableProperty ThumbBorderColorProperty = BindableProperty.Create( - nameof(ThumbBorderColor), typeof(Color), typeof(ExtendedSlider), Color.Default); + nameof(ThumbBorderColor), typeof(Color), typeof(ExtendedSlider), Color.FromHex("b5b5b5")); public Color ThumbBorderColor { diff --git a/src/App/Controls/ExtendedStepper.cs b/src/App/Controls/ExtendedStepper.cs index 88103eed5..664187b68 100644 --- a/src/App/Controls/ExtendedStepper.cs +++ b/src/App/Controls/ExtendedStepper.cs @@ -5,10 +5,10 @@ namespace Bit.App.Controls public class ExtendedStepper : Stepper { public static readonly BindableProperty StepperBackgroundColorProperty = BindableProperty.Create( - nameof(StepperBackgroundColor), typeof(Color), typeof(ExtendedStepper), Color.Default); + nameof(StepperBackgroundColor), typeof(Color), typeof(ExtendedStepper), Color.White); public static readonly BindableProperty StepperForegroundColorProperty = BindableProperty.Create( - nameof(StepperForegroundColor), typeof(Color), typeof(ExtendedStepper), Color.Default); + nameof(StepperForegroundColor), typeof(Color), typeof(ExtendedStepper), Color.Black); public Color StepperBackgroundColor { diff --git a/src/App/Pages/Accounts/SetPasswordPage.xaml b/src/App/Pages/Accounts/SetPasswordPage.xaml index 293f5d92c..c026e9fe7 100644 --- a/src/App/Pages/Accounts/SetPasswordPage.xaml +++ b/src/App/Pages/Accounts/SetPasswordPage.xaml @@ -47,7 +47,7 @@ Margin="0, 12, 0, 0" HasShadow="False" BackgroundColor="Transparent" - BorderColor="Accent"> + BorderColor="{DynamicResource PrimaryColor}">