From eac74d3f2283ec9f36e595261ab21716d910c15a Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Tue, 13 Apr 2021 02:00:08 +0200 Subject: Add an option to toggle accent keys These keys are not useful at all in English. A new option allows to hide them, [false] by default. --- srcs/juloo.keyboard2/Config.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'srcs/juloo.keyboard2/Config.java') diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index baecc1b..20e0311 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -9,7 +9,6 @@ class Config { private Keyboard2 _context; - public final float marginTop; public final float keyPadding; public final float keyBgPadding; @@ -23,6 +22,7 @@ class Config public float marginBottom; public float keyHeight; public float horizontalMargin; + public boolean disableAccentKeys; public Config(Keyboard2 context) { @@ -43,6 +43,7 @@ class Config marginBottom = res.getDimension(R.dimen.margin_bottom); keyHeight = res.getDimension(R.dimen.key_height); horizontalMargin = res.getDimension(R.dimen.horizontal_margin); + disableAccentKeys = false; // from prefs refresh(); } @@ -62,6 +63,7 @@ class Config marginBottom = getDipPref(prefs, "margin_bottom", marginBottom); keyHeight = getDipPref(prefs, "key_height", keyHeight); horizontalMargin = getDipPref(prefs, "horizontal_margin", horizontalMargin); + disableAccentKeys = prefs.getBoolean("disable_accent_keys", disableAccentKeys); } private float getDipPref(SharedPreferences prefs, String pref_name, float def) -- cgit v1.2.3