diff options
Diffstat (limited to 'srcs/juloo.keyboard2/Config.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Config.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index 5719bd9..16a92ef 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -42,6 +42,7 @@ public final class Config public boolean number_row_symbols; public float swipe_dist_px; public float slide_step_px; + public boolean suggestions_enabled; // Let the system handle vibration when false. public boolean vibrate_custom; // Control the vibration if [vibrate_custom] is true. @@ -50,7 +51,7 @@ public final class Config public long longPressInterval; public boolean keyrepeat_enabled; public float margin_bottom; - public int keyboardHeightPercent; + public int keyboard_rows_height_pixels; public int screenHeightPixels; public float horizontal_margin; public float key_vertical_margin; @@ -75,7 +76,6 @@ public final class Config // Dynamically set /** Configuration options implied by the connected editor. */ public EditorConfig editor_config; - public boolean should_show_candidates_view; public boolean shouldOfferVoiceTyping; public ExtraKeys extra_keys_subtype; public Map<KeyValue, KeyboardData.PreferredPos> extra_keys_param; @@ -102,7 +102,6 @@ public final class Config // from prefs refresh(res, foldableUnfolded); // initialized later - should_show_candidates_view = false; shouldOfferVoiceTyping = false; extra_keys_subtype = null; handler = h; @@ -120,6 +119,7 @@ public final class Config float characterSizeScale = 1.f; String show_numpad_s = _prefs.getString("show_numpad", "never"); show_numpad = "always".equals(show_numpad_s); + int keyboardHeightPercent; if (orientation_landscape) { if ("landscape".equals(show_numpad_s)) @@ -136,6 +136,7 @@ public final class Config String number_row = _prefs.getString("number_row", "no_number_row"); add_number_row = !number_row.equals("no_number_row"); number_row_symbols = number_row.equals("symbols"); + suggestions_enabled = _prefs.getBoolean("suggestions", true); // The baseline for the swipe distance correspond to approximately the // width of a key in portrait mode, as most layouts have 10 columns. // Multipled by the DPI ratio because most swipes are made in the diagonals. @@ -165,6 +166,12 @@ public final class Config customBorderRadius = _prefs.getInt("custom_border_radius", 0) / 100.f; customBorderLineWidth = get_dip_pref(dm, "custom_border_line_width", 0); screenHeightPixels = dm.heightPixels; + // Rows height is proportional to the screen height, meaning it doesn't + // change for layouts with more or less rows. 3.95 is the usual height of + // a layout in KeyboardData unit. The keyboard will be higher if the layout + // has more rows and smaller if it has less because rows stay the same + // height. + keyboard_rows_height_pixels = screenHeightPixels * keyboardHeightPercent / 395; horizontal_margin = get_dip_pref_oriented(dm, "horizontal_margin", 3, 28); double_tap_lock_shift = _prefs.getBoolean("lock_double_tap", false); |
