diff options
| author | Jules Aguillon | 2026-02-01 23:25:38 +0100 |
|---|---|---|
| committer | GitHub | 2026-02-01 23:25:38 +0100 |
| commit | 2ecf93d9904544ee73159e9f0ee74b49057bca6c (patch) | |
| tree | b574489e776a9ca665c7cc97b75f127527e59cd1 /srcs/juloo.keyboard2/Theme.java | |
| parent | b9072daaf62d5decb3377beeb281790a7512ae02 (diff) | |
| download | unexpected-keyboard-2ecf93d9904544ee73159e9f0ee74b49057bca6c.tar.gz unexpected-keyboard-2ecf93d9904544ee73159e9f0ee74b49057bca6c.zip | |
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.
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 |
