From 2ecf93d9904544ee73159e9f0ee74b49057bca6c Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 1 Feb 2026 23:25:38 +0100 Subject: Candidates view improvements (#1168) * Refactor: Create subpackage 'suggestions' * Candidates view: Status message when no dictionary installed Show a message on the candidates view instead of leaving it empty. A button points to the dictionary installation activity. * Add an option to disable the suggestions * Refactor: Remove Config.should_show_candidates_view This was moved to EditorConfig. * Don't disable text suggestions in some text boxes * Suggestion text size matching settings The candidates view height is based on the height of keyboard rows and the suggestion text size is based on the size of labels on the keys. This is influenced by symbol size and keyboard height options.--- srcs/juloo.keyboard2/Theme.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'srcs/juloo.keyboard2/Theme.java') 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 -- cgit v1.2.3