Prevent scrolling when keyboard hides

Fixes: #21
This commit is contained in:
Johannes Marbach 2022-01-27 20:31:29 +01:00
parent 9f74f37d4d
commit 608b7f0754

3
main.c
View file

@ -379,6 +379,9 @@ int main(int argc, char *argv[]) {
/* Initialise theme */
set_theme(is_alternate_theme);
/* Prevent scrolling when keyboard is off-screen */
lv_obj_clear_flag(lv_scr_act(), LV_OBJ_FLAG_SCROLLABLE);
/* Figure out a few numbers for sizing and positioning */
const int keyboard_height = ver_res > hor_res ? ver_res / 3 : ver_res / 2;
const int padding = keyboard_height / 8;