dashboard: use double tap into battery page and back gesture out

This commit is contained in:
2026-06-19 00:26:09 -06:00
parent bac159f4a4
commit 83814f13b6
2 changed files with 5 additions and 5 deletions
@@ -606,9 +606,9 @@ static void dashboard_root_event_cb(lv_event_t *event)
lv_dir_t dir = lv_indev_get_gesture_dir(indev);
if (current_dashboard_screen == SCREEN_OVERVIEW && dir == LV_DIR_RIGHT) {
queue_dashboard_page_switch(SCREEN_BATTERY_DETAIL);
} else if (current_dashboard_screen == SCREEN_BATTERY_DETAIL && dir == LV_DIR_LEFT) {
// Only Battery Detail uses swipe navigation.
// Left-to-right swipe acts like a smartphone back gesture.
if (current_dashboard_screen == SCREEN_BATTERY_DETAIL && dir == LV_DIR_RIGHT) {
queue_dashboard_page_switch(SCREEN_OVERVIEW);
}
}
@@ -724,7 +724,7 @@ static void create_battery_detail_screen()
lv_obj_align(title, LV_ALIGN_LEFT_MID, 22, 0);
lv_obj_t *hint = lv_label_create(system_card);
lv_label_set_text(hint, "Swipe left for main");
lv_label_set_text(hint, "Swipe right to go back");
lv_obj_set_style_text_color(hint, lv_color_hex(0xB8C0C8), 0);
lv_obj_set_style_text_font(hint, &lv_font_montserrat_26, 0);
lv_obj_align(hint, LV_ALIGN_RIGHT_MID, -18, 0);