[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
This commit is contained in:
aj-rosado 2022-12-02 16:38:25 +00:00 committed by GitHub
parent a4673021a9
commit 4580033477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 23 additions and 22 deletions

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -47,7 +47,7 @@
Margin="0, 12, 0, 0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{u:I18n ResetPasswordAutoEnrollInviteWarning}"
StyleClass="text-muted, text-sm, text-bold"
@ -69,7 +69,7 @@
Margin="0, 12, 0, 0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{Binding PolicySummary}"
StyleClass="text-muted, text-sm, text-bold"

View File

@ -44,7 +44,7 @@
Margin="0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{u:I18n UpdateMasterPasswordWarning}"
StyleClass="text-muted, text-sm, text-bold"
@ -67,7 +67,7 @@
Margin="0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{Binding PolicySummary}"
StyleClass="text-muted, text-sm, text-bold"

View File

@ -66,7 +66,7 @@
Margin="0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{u:I18n PasswordGeneratorPolicyInEffect}"
StyleClass="text-muted, text-sm, text-bold"
@ -462,7 +462,7 @@
StyleClass="box-value"
HorizontalOptions="End"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n LowercaseAtoZ}" />
AutomationProperties.Name="{u:I18n LowercaseAtoZ}"/>
</StackLayout>
<BoxView StyleClass="box-row-separator" />
<StackLayout StyleClass="box-row, box-row-switch">

View File

@ -67,7 +67,7 @@
Margin="0, 12, 0, 0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{u:I18n SendDisabledWarning}"
StyleClass="text-muted, text-sm, text-bold"
@ -79,7 +79,7 @@
Margin="0, 12, 0, 0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{u:I18n SendOptionsPolicyInEffect}"
StyleClass="text-muted, text-sm, text-bold"

View File

@ -48,7 +48,7 @@
Margin="0, 12, 0, 0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{u:I18n SendDisabledWarning}"
StyleClass="text-muted, text-sm, text-bold"
@ -60,7 +60,7 @@
Margin="0, 12, 0, 0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{u:I18n SendOptionsPolicyInEffect}"
StyleClass="text-muted, text-sm, text-bold"

View File

@ -108,7 +108,7 @@
Margin="0, 12, 0, 6"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{u:I18n SendDisabledWarning}"
StyleClass="text-muted, text-sm, text-bold"

View File

@ -34,7 +34,7 @@
Margin="0, 12, 0, 0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{u:I18n DisablePersonalVaultExportPolicyInEffect}"
StyleClass="text-muted, text-sm, text-bold"

View File

@ -26,7 +26,7 @@
Padding="10"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{Binding Name, Mode=OneWay}"
StyleClass="text-muted, text-sm, text-bold"
@ -57,7 +57,7 @@
Padding="10"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{Binding Name, Mode=OneWay}"
StyleClass="text-muted, text-sm, text-bold"

View File

@ -96,7 +96,7 @@
Margin="0"
HasShadow="False"
BackgroundColor="Transparent"
BorderColor="Accent">
BorderColor="{DynamicResource PrimaryColor}">
<Label
Text="{u:I18n PersonalOwnershipPolicyInEffect}"
StyleClass="text-muted, text-sm, text-bold"