1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-27 12:26:31 +01:00

[PS-1188] Add new Solarized Dark Theme (#2141)

* PS-1188 Add new Solarized Dark Theme
This commit is contained in:
aj-rosado 2022-10-19 10:57:01 +01:00 committed by GitHub
parent eefc9bd239
commit 4c2f5c05e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 108 additions and 0 deletions

View File

@ -56,12 +56,14 @@ namespace Bit.App.Pages
new KeyValuePair<string, string>(ThemeManager.Dark, AppResources.Dark),
new KeyValuePair<string, string>(ThemeManager.Black, AppResources.Black),
new KeyValuePair<string, string>(ThemeManager.Nord, AppResources.Nord),
new KeyValuePair<string, string>(ThemeManager.SolarizedDark, AppResources.SolarizedDark),
};
AutoDarkThemeOptions = new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>(ThemeManager.Dark, AppResources.Dark),
new KeyValuePair<string, string>(ThemeManager.Black, AppResources.Black),
new KeyValuePair<string, string>(ThemeManager.Nord, AppResources.Nord),
new KeyValuePair<string, string>(ThemeManager.SolarizedDark, AppResources.SolarizedDark),
};
UriMatchOptions = new List<KeyValuePair<UriMatchType?, string>>
{

View File

@ -5506,6 +5506,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Solarized Dark.
/// </summary>
public static string SolarizedDark {
get {
return ResourceManager.GetString("SolarizedDark", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Special characters (!@#$%^&amp;*).
/// </summary>

View File

@ -1575,6 +1575,10 @@ Scanning will happen automatically.</value>
<value>Nord</value>
<comment>'Nord' is the name of a specific color scheme. It should not be translated.</comment>
</data>
<data name="SolarizedDark" xml:space="preserve">
<value>Solarized Dark</value>
<comment>'Solarized Dark' is the name of a specific color scheme. It should not be translated.</comment>
</data>
<data name="AutofillBlockedUris" xml:space="preserve">
<value>Auto-fill blocked URIs</value>
</data>

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Bit.App.Styles.SolarizedDark">
<Color x:Key="TextColor">#eee8d5</Color>
<Color x:Key="PrimaryColor">#859900</Color>
<Color x:Key="DangerColor">#dc322f</Color>
<Color x:Key="SuccessColor">#859900</Color>
<Color x:Key="InfoColor">#859900</Color>
<Color x:Key="WarningColor">#b58900</Color>
<Color x:Key="MutedColor">#839496</Color>
<Color x:Key="PasswordNumberColor">#2aa198</Color>
<Color x:Key="PasswordSpecialColor">#b58900</Color>
<Color x:Key="ButtonColor">#93a1a1</Color>
<Color x:Key="InputPlaceholderColor">#657b83</Color>
<Color x:Key="DangerPressedColor">#cb4b16</Color>
<Color x:Key="BackgroundColor">#002b36</Color>
<Color x:Key="SplashBackgroundColor">#073642</Color>
<Color x:Key="BorderColor">#073642</Color>
<Color x:Key="DisabledIconColor">#839496</Color>
<Color x:Key="SeparatorColor">#073642</Color>
<Color x:Key="TouchColor">#859900</Color>
<Color x:Key="BoxBorderColor">#073642</Color>
<Color x:Key="BoxHeaderTextColor">#859900</Color>
<Color x:Key="TitleTextColor">#eee8d5</Color>
<Color x:Key="TitleEntryTextColor">#eee8d5</Color>
<Color x:Key="TitleEntryPlaceholderColor">#657b83</Color>
<Color x:Key="ListItemBorderColor">#073642</Color>
<Color x:Key="ListSectionBorderColor">#073642</Color>
<Color x:Key="ListSectionBorderBottomColor">#073642</Color>
<Color x:Key="ListHeaderTextColor">#859900</Color>
<Color x:Key="ListHeaderBackgroundColor">#073642</Color>
<Color x:Key="SliderThumbColor">#eee8d5</Color>
<Color x:Key="SliderThumbBorderColor">#073642</Color>
<Color x:Key="SliderTrackMinColor">#859900</Color>
<Color x:Key="SliderTrackMaxColor">#073642</Color>
<Color x:Key="SwitchOnColor">#859900</Color>
<Color x:Key="SwitchThumbColor">#eee8d5</Color>
<Color x:Key="StepperBackgroundColor">#657b83</Color>
<Color x:Key="StepperForegroundColor">#eee8d5</Color>
<Color x:Key="ButtonPrimaryBackgroundColor">#859900</Color>
<Color x:Key="ButtonPrimaryBackgroundColorPressed">#667500</Color>
<Color x:Key="ButtonPrimaryBackgroundColorDisabled">#4d541c</Color>
<Color x:Key="ButtonPrimaryTextColor">#e5e9f0</Color>
<Color x:Key="ButtonPrimaryTextColorDisabled">#ACB5C5</Color>
<Color x:Key="ButtonBackgroundColor">#657b83</Color>
<Color x:Key="ButtonBackgroundColorPressed">#3A4251</Color>
<Color x:Key="ButtonBackgroundColorDisabled">#454951</Color>
<Color x:Key="ButtonBorderColor">#073642</Color>
<Color x:Key="ButtonTextColor">#eee8d5</Color>
<Color x:Key="ButtonTextColorDisabled">#aaaaaa</Color>
<Color x:Key="ButtonTextColorOpacity">#99eee8d5</Color>
<Color x:Key="FabColor">#859900</Color>
<Color x:Key="FabPressedColor">#859900</Color>
<Color x:Key="TabBarBackgroundColor">#073642</Color>
<Color x:Key="TabBarItemColor">#eee8d5</Color>
<Color x:Key="TabBarSelectedItemColor">#859900</Color>
<Color x:Key="NavigationBarBackgroundColor">#073642</Color>
<Color x:Key="NavigationBarTextColor">#eee8d5</Color>
<Color x:Key="HyperlinkColor">#859900</Color>
<Color x:Key="FingerprintPhrase">#F08DC7</Color>
<Color x:Key="ScanningToggleModeTextColor">#80BDFF</Color>
</ResourceDictionary>

View File

@ -0,0 +1,12 @@
using Xamarin.Forms;
namespace Bit.App.Styles
{
public partial class SolarizedDark : ResourceDictionary, IThemeResourceDictionary
{
public SolarizedDark()
{
InitializeComponent();
}
}
}

View File

@ -21,6 +21,7 @@ namespace Bit.App.Utilities
public const string Dark = "dark";
public const string Black = "black";
public const string Nord = "nord";
public const string SolarizedDark = "solarizeddark";
public static void SetThemeStyle(string name, string autoDarkName, ResourceDictionary resources)
{
@ -102,6 +103,8 @@ namespace Bit.App.Utilities
return CheckAndGetThemeForMergedDictionaries(typeof(Nord), resources);
case Light:
return CheckAndGetThemeForMergedDictionaries(typeof(Light), resources);
case SolarizedDark:
return CheckAndGetThemeForMergedDictionaries(typeof(SolarizedDark), resources);
default:
if (OsDarkModeEnabled())
{
@ -111,6 +114,8 @@ namespace Bit.App.Utilities
return CheckAndGetThemeForMergedDictionaries(typeof(Black), resources);
case Nord:
return CheckAndGetThemeForMergedDictionaries(typeof(Nord), resources);
case SolarizedDark:
return CheckAndGetThemeForMergedDictionaries(typeof(SolarizedDark), resources);
default:
return CheckAndGetThemeForMergedDictionaries(typeof(Dark), resources);
}