From 8f2bcc0d7353e142f784bc19a8905627f1c8c991 Mon Sep 17 00:00:00 2001 From: DiSlord Date: Wed, 8 Jul 2020 23:13:43 +0300 Subject: [PATCH] Cleanup non cell area under button on exit --- ui.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui.c b/ui.c index 3f66690..d47d453 100644 --- a/ui.c +++ b/ui.c @@ -1771,6 +1771,9 @@ leave_ui_mode() // request_to_draw_cells_behind_numeric_input(); // erase_numeric_input(); // } + // Erase bottom area (not redraw on area update) + if (MENU_BUTTON_HEIGHT*MENU_BUTTON_MAX - area_height > 0) + ili9341_fill(LCD_WIDTH-MENU_BUTTON_WIDTH, area_height, MENU_BUTTON_WIDTH, MENU_BUTTON_HEIGHT*MENU_BUTTON_MAX - area_height, DEFAULT_BG_COLOR); redraw_request|=REDRAW_AREA | REDRAW_FREQUENCY | REDRAW_CAL_STATUS | REDRAW_BATTERY; } @@ -1927,10 +1930,9 @@ ui_mode_normal(void) { if (ui_mode == UI_NORMAL) return; - + leave_ui_mode(); area_width = AREA_WIDTH_NORMAL; area_height = AREA_HEIGHT_NORMAL; - leave_ui_mode(); ui_mode = UI_NORMAL; }