mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-14 18:38:55 +00:00
lvgl ui support AiUIBuilder
This commit is contained in:
@@ -224,10 +224,13 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
|
||||
lv_disp_t * d = lv_obj_get_disp(new_scr);
|
||||
lv_obj_t * act_scr = lv_scr_act();
|
||||
|
||||
if(act_scr == new_scr || d->scr_to_load == new_scr) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*If an other screen load animation is in progress
|
||||
*make target screen loaded immediately. */
|
||||
if(d->scr_to_load && act_scr != d->scr_to_load) {
|
||||
scr_load_internal(d->scr_to_load);
|
||||
if(d->scr_to_load) {
|
||||
lv_anim_del(d->scr_to_load, NULL);
|
||||
lv_obj_set_pos(d->scr_to_load, 0, 0);
|
||||
lv_obj_remove_local_style_prop(d->scr_to_load, LV_STYLE_OPA, 0);
|
||||
@@ -236,6 +239,8 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
|
||||
lv_obj_del(act_scr);
|
||||
}
|
||||
act_scr = d->scr_to_load;
|
||||
|
||||
scr_load_internal(d->scr_to_load);
|
||||
}
|
||||
|
||||
d->scr_to_load = new_scr;
|
||||
@@ -258,10 +263,10 @@ void lv_scr_load_anim(lv_obj_t * new_scr, lv_scr_load_anim_t anim_type, uint32_t
|
||||
lv_obj_remove_local_style_prop(new_scr, LV_STYLE_OPA, 0);
|
||||
lv_obj_remove_local_style_prop(lv_scr_act(), LV_STYLE_OPA, 0);
|
||||
|
||||
|
||||
/*Shortcut for immediate load*/
|
||||
if(time == 0 && delay == 0) {
|
||||
scr_load_internal(new_scr);
|
||||
if(auto_del) lv_obj_del(act_scr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -477,6 +482,7 @@ static void scr_load_internal(lv_obj_t * scr)
|
||||
if(d->act_scr) lv_event_send(scr, LV_EVENT_SCREEN_LOAD_START, NULL);
|
||||
|
||||
d->act_scr = scr;
|
||||
d->scr_to_load = NULL;
|
||||
|
||||
if(d->act_scr) lv_event_send(scr, LV_EVENT_SCREEN_LOADED, NULL);
|
||||
if(d->act_scr) lv_event_send(old_scr, LV_EVENT_SCREEN_UNLOADED, NULL);
|
||||
|
||||
Reference in New Issue
Block a user