mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-23 11:45:38 +01:00
[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:
parent
a4673021a9
commit
4580033477
@ -44,6 +44,7 @@ namespace Bit.Droid.Renderers
|
|||||||
}
|
}
|
||||||
if (Control != null)
|
if (Control != null)
|
||||||
{
|
{
|
||||||
|
Control.SetHintTextColor(ThemeHelpers.MutedColor);
|
||||||
var t = ResourcesCompat.GetDrawable(Resources, Resource.Drawable.switch_thumb, null);
|
var t = ResourcesCompat.GetDrawable(Resources, Resource.Drawable.switch_thumb, null);
|
||||||
if (t is GradientDrawable thumb)
|
if (t is GradientDrawable thumb)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,7 @@ namespace Bit.Droid.Utilities
|
|||||||
theme = ThemeManager.Dark;
|
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;
|
LightTheme = false;
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,13 @@ namespace Bit.App.Controls
|
|||||||
nameof(StrokeWidth), typeof(float), typeof(CircularProgressbarView), 3f);
|
nameof(StrokeWidth), typeof(float), typeof(CircularProgressbarView), 3f);
|
||||||
|
|
||||||
public static readonly BindableProperty ProgressColorProperty = BindableProperty.Create(
|
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(
|
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(
|
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
|
public double Progress
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ namespace Bit.App.Controls
|
|||||||
public class ExtendedSlider : Slider
|
public class ExtendedSlider : Slider
|
||||||
{
|
{
|
||||||
public static readonly BindableProperty ThumbBorderColorProperty = BindableProperty.Create(
|
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
|
public Color ThumbBorderColor
|
||||||
{
|
{
|
||||||
|
@ -5,10 +5,10 @@ namespace Bit.App.Controls
|
|||||||
public class ExtendedStepper : Stepper
|
public class ExtendedStepper : Stepper
|
||||||
{
|
{
|
||||||
public static readonly BindableProperty StepperBackgroundColorProperty = BindableProperty.Create(
|
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(
|
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
|
public Color StepperBackgroundColor
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
Margin="0, 12, 0, 0"
|
Margin="0, 12, 0, 0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n ResetPasswordAutoEnrollInviteWarning}"
|
Text="{u:I18n ResetPasswordAutoEnrollInviteWarning}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
@ -69,7 +69,7 @@
|
|||||||
Margin="0, 12, 0, 0"
|
Margin="0, 12, 0, 0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{Binding PolicySummary}"
|
Text="{Binding PolicySummary}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
Margin="0"
|
Margin="0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n UpdateMasterPasswordWarning}"
|
Text="{u:I18n UpdateMasterPasswordWarning}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
@ -67,7 +67,7 @@
|
|||||||
Margin="0"
|
Margin="0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{Binding PolicySummary}"
|
Text="{Binding PolicySummary}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
Margin="0"
|
Margin="0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n PasswordGeneratorPolicyInEffect}"
|
Text="{u:I18n PasswordGeneratorPolicyInEffect}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
@ -462,7 +462,7 @@
|
|||||||
StyleClass="box-value"
|
StyleClass="box-value"
|
||||||
HorizontalOptions="End"
|
HorizontalOptions="End"
|
||||||
AutomationProperties.IsInAccessibleTree="True"
|
AutomationProperties.IsInAccessibleTree="True"
|
||||||
AutomationProperties.Name="{u:I18n LowercaseAtoZ}" />
|
AutomationProperties.Name="{u:I18n LowercaseAtoZ}"/>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
<BoxView StyleClass="box-row-separator" />
|
<BoxView StyleClass="box-row-separator" />
|
||||||
<StackLayout StyleClass="box-row, box-row-switch">
|
<StackLayout StyleClass="box-row, box-row-switch">
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
Margin="0, 12, 0, 0"
|
Margin="0, 12, 0, 0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n SendDisabledWarning}"
|
Text="{u:I18n SendDisabledWarning}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
@ -79,7 +79,7 @@
|
|||||||
Margin="0, 12, 0, 0"
|
Margin="0, 12, 0, 0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n SendOptionsPolicyInEffect}"
|
Text="{u:I18n SendOptionsPolicyInEffect}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
Margin="0, 12, 0, 0"
|
Margin="0, 12, 0, 0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n SendDisabledWarning}"
|
Text="{u:I18n SendDisabledWarning}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
@ -60,7 +60,7 @@
|
|||||||
Margin="0, 12, 0, 0"
|
Margin="0, 12, 0, 0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n SendOptionsPolicyInEffect}"
|
Text="{u:I18n SendOptionsPolicyInEffect}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
Margin="0, 12, 0, 6"
|
Margin="0, 12, 0, 6"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n SendDisabledWarning}"
|
Text="{u:I18n SendDisabledWarning}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
Margin="0, 12, 0, 0"
|
Margin="0, 12, 0, 0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n DisablePersonalVaultExportPolicyInEffect}"
|
Text="{u:I18n DisablePersonalVaultExportPolicyInEffect}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
Padding="10"
|
Padding="10"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{Binding Name, Mode=OneWay}"
|
Text="{Binding Name, Mode=OneWay}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
@ -57,7 +57,7 @@
|
|||||||
Padding="10"
|
Padding="10"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{Binding Name, Mode=OneWay}"
|
Text="{Binding Name, Mode=OneWay}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
Margin="0"
|
Margin="0"
|
||||||
HasShadow="False"
|
HasShadow="False"
|
||||||
BackgroundColor="Transparent"
|
BackgroundColor="Transparent"
|
||||||
BorderColor="Accent">
|
BorderColor="{DynamicResource PrimaryColor}">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n PersonalOwnershipPolicyInEffect}"
|
Text="{u:I18n PersonalOwnershipPolicyInEffect}"
|
||||||
StyleClass="text-muted, text-sm, text-bold"
|
StyleClass="text-muted, text-sm, text-bold"
|
||||||
|
Loading…
Reference in New Issue
Block a user