mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-10-20 20:42:03 +00:00
feat(ui-lvgl): phone-style Home -- clock with telemetry, minimap, app grid
Home pages: favourites, the clock (tap for Clock) with three telemetry fields picked by holding one (shared dashboard_fields), a minimap that frames you, live shares and the target (tap for the Navigation map), and the apps in 3x2 pages. The side button now returns to the clock page with a cross-fade instead of going back. Home moves to HomeScreen.h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ namespace anim {
|
||||
static const uint32_t PAGE_MS = 160; // Home page after a swipe
|
||||
static const uint32_t UNLOCK_MS = 260; // lock screen away
|
||||
static const uint32_t SPRING_MS = 200; // a let-go slider knob back home
|
||||
static const uint32_t FADE_MS = 280; // the side button's cross-fade to Home
|
||||
|
||||
static void setTy(void* o, int32_t v) { lv_obj_set_style_translate_y((lv_obj_t*)o, v, 0); }
|
||||
static void setTx(void* o, int32_t v) { lv_obj_set_style_translate_x((lv_obj_t*)o, v, 0); }
|
||||
@@ -68,6 +69,13 @@ namespace anim {
|
||||
run(o, setOpa, LV_OPA_40, LV_OPA_COVER, ms);
|
||||
}
|
||||
|
||||
// Content replaced in place without a direction: fades up from nothing.
|
||||
static void fadeIn(lv_obj_t* o, uint32_t ms = FADE_MS) {
|
||||
lv_anim_delete(o, NULL); // no slide left over from a swipe
|
||||
lv_obj_set_style_translate_x(o, 0, 0);
|
||||
run(o, setOpa, LV_OPA_TRANSP, LV_OPA_COVER, ms);
|
||||
}
|
||||
|
||||
static void hideDone(lv_anim_t* a) {
|
||||
lv_obj_t* o = (lv_obj_t*)a->var;
|
||||
lv_obj_add_flag(o, LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
Reference in New Issue
Block a user