From d5d80e81c081f946e61b0b5a2eb86b9db7fc13b5 Mon Sep 17 00:00:00 2001 From: wenil Date: Sat, 20 Jun 2026 14:45:23 +0300 Subject: [PATCH] v2 Phase 2: fix launcher scroll rest position + back chevron placement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tile grid used track_cross_place=CENTER, which vertically centers the overflowing block of rows — hiding the top row under the title and springing back to it after an elastic pull. Switch to START so rows stack from the top: the first row sits under the title and the rest is reached by scrolling down. Nudge the back chevron down/right so it clears the rounded top-left corner. Co-Authored-By: Claude Opus 4.8 --- firmware/src/ui.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/firmware/src/ui.cpp b/firmware/src/ui.cpp index 5bdcb20..39c9902 100644 --- a/firmware/src/ui.cpp +++ b/firmware/src/ui.cpp @@ -504,7 +504,11 @@ static void init_menu_screen(lv_obj_t* scr) { lv_obj_set_style_pad_row(grid, 12, 0); lv_obj_set_style_pad_column(grid, 12, 0); lv_obj_set_flex_flow(grid, LV_FLEX_FLOW_ROW_WRAP); - lv_obj_set_flex_align(grid, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER); + // track_cross_place = START: stack rows from the top so the first row sits + // just under the title and the rest is reached by scrolling DOWN. (CENTER + // would vertically center the overflowing block, hiding the top row under + // the title and springing back to it after an elastic pull.) + lv_obj_set_flex_align(grid, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_START); lv_obj_set_scroll_dir(grid, LV_DIR_VER); lv_obj_set_scrollbar_mode(grid, LV_SCROLLBAR_MODE_AUTO); @@ -627,7 +631,7 @@ void ui_init(void) { lv_label_set_text(nav_back_btn, LV_SYMBOL_LEFT); lv_obj_set_style_text_font(nav_back_btn, &lv_font_montserrat_28, 0); lv_obj_set_style_text_color(nav_back_btn, COL_TEXT, 0); - lv_obj_set_pos(nav_back_btn, L.margin, L.title_y); + lv_obj_set_pos(nav_back_btn, L.margin + 4, L.title_y + 10); // clear of the rounded top-left corner lv_obj_add_flag(nav_back_btn, LV_OBJ_FLAG_CLICKABLE); lv_obj_set_ext_click_area(nav_back_btn, 18); lv_obj_add_event_cb(nav_back_btn, nav_back_cb, LV_EVENT_CLICKED, NULL);