diff options
Diffstat (limited to 'srcs/juloo.keyboard2/Theme.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Theme.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/srcs/juloo.keyboard2/Theme.java b/srcs/juloo.keyboard2/Theme.java index 9af0d01..f291f36 100644 --- a/srcs/juloo.keyboard2/Theme.java +++ b/srcs/juloo.keyboard2/Theme.java @@ -102,14 +102,10 @@ public class Theme public Computed(Theme theme, Config config, float keyWidth, KeyboardData layout) { - // Rows height is proportional to the keyboard 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. - row_height = Math.min( - config.screenHeightPixels * config.keyboardHeightPercent / 100 / 3.95f, - config.screenHeightPixels / layout.keysHeight); + // Make sure that the layout isn't higher than the screen. Take the + // height of the candidates view into account. + row_height = Math.min(config.keyboard_rows_height_pixels, + (config.screenHeightPixels - config.keyboard_rows_height_pixels) / layout.keysHeight); vertical_margin = config.key_vertical_margin * row_height; horizontal_margin = config.key_horizontal_margin * keyWidth; // Add half of the key margin on the left and on the top as it's also |
