From a365fdc6a36e0b74d3486f7633b7e0bba42f4020 Mon Sep 17 00:00:00 2001 From: Piotrek Marciniak Date: Sat, 24 Sep 2022 13:13:51 +0200 Subject: [PATCH] Add white e-ink oriented theme (#193) * Add white e-ing oriented theme Co-authored-by: Jules Aguillon --- res/values-fr/strings.xml | 1 + res/values/arrays.xml | 2 ++ res/values/strings.xml | 1 + res/values/themes.xml | 12 ++++++++++++ srcs/juloo.keyboard2/Config.java | 11 +---------- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 10eb93a..7d501e6 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -31,6 +31,7 @@ Sombre Clair Noir + Blanc Très courte Courte Normale diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 797147e..d19ad54 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -71,12 +71,14 @@ @string/pref_theme_e_dark @string/pref_theme_e_light @string/pref_theme_e_black + @string/pref_theme_e_white system dark light black + white @string/pref_swipe_dist_e_very_short diff --git a/res/values/strings.xml b/res/values/strings.xml index 513b88f..aef3b2d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -40,6 +40,7 @@ Dark Light Black + White Very short Short Normal diff --git a/res/values/themes.xml b/res/values/themes.xml index 8aa27d7..1c42740 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -69,4 +69,16 @@ #000000 #ffffff + diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index fd226ed..3a8d15f 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -228,6 +228,7 @@ final class Config case "light": return R.style.Light; case "black": return R.style.Black; case "dark": return R.style.Dark; + case "white": return R.style.White; default: case "system": 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; public static void initGlobalConfig(Context context, IKeyEventHandler handler)