From a7a5503e2795fae244044bff0bd9295e0ffebc0b Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Sun, 10 Sep 2023 00:59:13 +0200 Subject: [PATCH] Compact++ --- applications/services/gui/modules/menu.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/applications/services/gui/modules/menu.c b/applications/services/gui/modules/menu.c index 40d0b5f1b..61b0910b4 100644 --- a/applications/services/gui/modules/menu.c +++ b/applications/services/gui/modules/menu.c @@ -359,25 +359,25 @@ static void menu_draw_callback(Canvas* canvas, void* _model) { size_t index; size_t y_off, x_off; - canvas_set_font(canvas, FontKeyboard); + canvas_set_font(canvas, FontBatteryPercent); for(size_t i = 0; i < 2; i++) { - for(size_t j = 0; j < 7; j++) { - index = i * 7 + j + (position - (position % 14)); + for(size_t j = 0; j < 8; j++) { + index = i * 8 + j + (position - (position % 16)); if(index >= items_count) continue; - y_off = (9 * j) - 4; + y_off = (8 * j); x_off = 64 * i; bool selected = index == position; size_t scroll_counter = menu_scroll_counter(model, selected); if(selected) { - canvas_draw_box(canvas, x_off, y_off + 4, 64, 9); + canvas_draw_box(canvas, x_off, y_off, 64, 8); canvas_set_color(canvas, ColorWhite); } item = MenuItemArray_get(model->items, index); menu_short_name(item, name); elements_scrollable_text_line( - canvas, x_off + 2, y_off + 12, 64, name, scroll_counter, false); + canvas, x_off + 1, y_off + 7, 62, name, scroll_counter, false); if(selected) { canvas_set_color(canvas, ColorBlack); @@ -744,10 +744,10 @@ static void menu_process_left(Menu* menu) { vertical_offset = CLAMP(MAX((int)position - 4, 0), MAX((int)count - 8, 0), 0); break; case MenuStyleCompact: - if((position % 14) < 7) { - position = position + 7; + if((position % 16) < 8) { + position = position + 8; } else { - position = position - 7; + position = position - 8; } vertical_offset = CLAMP(MAX((int)position - 4, 0), MAX((int)count - 8, 0), 0); break; @@ -811,10 +811,10 @@ static void menu_process_right(Menu* menu) { vertical_offset = CLAMP(MAX((int)position - 4, 0), MAX((int)count - 8, 0), 0); break; case MenuStyleCompact: - if((position % 14) < 7) { - position = position + 7; + if((position % 16) < 8) { + position = position + 8; } else { - position = position - 7; + position = position - 8; } vertical_offset = CLAMP(MAX((int)position - 4, 0), MAX((int)count - 8, 0), 0); break;