From 833dfa31bb17e5fa14681f15969391ecc7a28014 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 15 Jan 2022 20:24:27 +0100 Subject: Fix miscalculation of the space between the keys 'keyVerticalInterval' was mistakenly used to compute the height of the keyboard and the vertical position of keys. While the code handling pointers did not use this value, the hit box of the bottom row was shifted by several pixels. Make sure 'keyVerticalInterval' is only used for rendering and not for placing the keys. --- 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 63befa5..92cd8a6 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -86,7 +86,9 @@ final class Config longPressTimeout = prefs.getInt("longpress_timeout", (int)longPressTimeout); longPressInterval = prefs.getInt("longpress_interval", (int)longPressInterval); marginBottom = getDipPref(dm, prefs, "margin_bottom", marginBottom); - keyHeight = getDipPref(dm, prefs, "key_height", keyHeight); + // Add keyVerticalInterval to keyHeight because the space between the keys + // is removed from the keys during rendering + keyHeight = getDipPref(dm, prefs, "key_height", keyHeight) + keyVerticalInterval; horizontalMargin = getDipPref(dm, prefs, "horizontal_margin", horizontalMargin); preciseRepeat = prefs.getBoolean("precise_repeat", preciseRepeat); characterSize = prefs.getFloat("character_size", characterSize); -- cgit v1.2.3