Add white e-ink oriented theme (#193)

* Add white e-ing oriented theme

Co-authored-by: Jules Aguillon <jules@j3s.fr>
This commit is contained in:
Piotrek Marciniak 2022-09-24 13:13:51 +02:00 committed by GitHub
parent 9fc1565065
commit a365fdc6a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 10 deletions

View File

@ -31,6 +31,7 @@
<string name="pref_theme_e_dark">Sombre</string> <string name="pref_theme_e_dark">Sombre</string>
<string name="pref_theme_e_light">Clair</string> <string name="pref_theme_e_light">Clair</string>
<string name="pref_theme_e_black">Noir</string> <string name="pref_theme_e_black">Noir</string>
<string name="pref_theme_e_white">Blanc</string>
<string name="pref_swipe_dist_e_very_short">Très courte</string> <string name="pref_swipe_dist_e_very_short">Très courte</string>
<string name="pref_swipe_dist_e_short">Courte</string> <string name="pref_swipe_dist_e_short">Courte</string>
<string name="pref_swipe_dist_e_default">Normale</string> <string name="pref_swipe_dist_e_default">Normale</string>

View File

@ -71,12 +71,14 @@
<item>@string/pref_theme_e_dark</item> <item>@string/pref_theme_e_dark</item>
<item>@string/pref_theme_e_light</item> <item>@string/pref_theme_e_light</item>
<item>@string/pref_theme_e_black</item> <item>@string/pref_theme_e_black</item>
<item>@string/pref_theme_e_white</item>
</string-array> </string-array>
<string-array name="pref_theme_values"> <string-array name="pref_theme_values">
<item>system</item> <item>system</item>
<item>dark</item> <item>dark</item>
<item>light</item> <item>light</item>
<item>black</item> <item>black</item>
<item>white</item>
</string-array> </string-array>
<string-array name="pref_swipe_dist_entries"> <string-array name="pref_swipe_dist_entries">
<item>@string/pref_swipe_dist_e_very_short</item> <item>@string/pref_swipe_dist_e_very_short</item>

View File

@ -40,6 +40,7 @@
<string name="pref_theme_e_dark">Dark</string> <string name="pref_theme_e_dark">Dark</string>
<string name="pref_theme_e_light">Light</string> <string name="pref_theme_e_light">Light</string>
<string name="pref_theme_e_black">Black</string> <string name="pref_theme_e_black">Black</string>
<string name="pref_theme_e_white">White</string>
<string name="pref_swipe_dist_e_very_short">Very short</string> <string name="pref_swipe_dist_e_very_short">Very short</string>
<string name="pref_swipe_dist_e_short">Short</string> <string name="pref_swipe_dist_e_short">Short</string>
<string name="pref_swipe_dist_e_default">Normal</string> <string name="pref_swipe_dist_e_default">Normal</string>

View File

@ -69,4 +69,16 @@
<item name="emoji_button_bg">#000000</item> <item name="emoji_button_bg">#000000</item>
<item name="emoji_color">#ffffff</item> <item name="emoji_color">#ffffff</item>
</style> </style>
<style name="White" parent="BaseTheme">
<item name="android:isLightTheme">true</item>
<item name="colorKeyboard">#ffffff</item>
<item name="colorKey">#ffffff</item>
<item name="colorKeyActivated">#cccccc</item>
<item name="colorLabel">#000000</item>
<item name="colorLabelActivated">#0066cc</item>
<item name="colorLabelLocked">#33cc33</item>
<item name="colorSubLabel">#333333</item>
<item name="emoji_button_bg">#ffffff</item>
<item name="emoji_color">#000000</item>
</style>
</resources> </resources>

View File

@ -228,6 +228,7 @@ final class Config
case "light": return R.style.Light; case "light": return R.style.Light;
case "black": return R.style.Black; case "black": return R.style.Black;
case "dark": return R.style.Dark; case "dark": return R.style.Dark;
case "white": return R.style.White;
default: default:
case "system": case "system":
if (Build.VERSION.SDK_INT >= 8) if (Build.VERSION.SDK_INT >= 8)
@ -267,16 +268,6 @@ final class Config
} }
} }
public static int themeId_of_string(String name)
{
switch (name)
{
case "light": return R.style.Light;
case "black": return R.style.Black;
default: case "dark": return R.style.Dark;
}
}
private static Config _globalConfig = null; private static Config _globalConfig = null;
public static void initGlobalConfig(Context context, IKeyEventHandler handler) public static void initGlobalConfig(Context context, IKeyEventHandler handler)