mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-21 06:53:01 +08:00
transition fixes with time = 0
This commit is contained in:
parent
7bfc82317a
commit
5ad4ede4d2
@ -1551,7 +1551,6 @@ void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
|
|||||||
props[4] = lv_obj_get_style_transition_prop_5(obj, part);
|
props[4] = lv_obj_get_style_transition_prop_5(obj, part);
|
||||||
props[5] = lv_obj_get_style_transition_prop_6(obj, part);
|
props[5] = lv_obj_get_style_transition_prop_6(obj, part);
|
||||||
|
|
||||||
|
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
for(i = 0; i < LV_STYLE_TRANS_NUM_MAX; i++) {
|
for(i = 0; i < LV_STYLE_TRANS_NUM_MAX; i++) {
|
||||||
if(props[i] != 0) {
|
if(props[i] != 0) {
|
||||||
@ -1565,10 +1564,6 @@ void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
|
|||||||
tr->prop = props[i];
|
tr->prop = props[i];
|
||||||
tr->part = part;
|
tr->part = part;
|
||||||
|
|
||||||
if(time == 0) {
|
|
||||||
trans_anim_cb(tr, 255);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
lv_anim_t a;
|
lv_anim_t a;
|
||||||
lv_anim_init(&a);
|
lv_anim_init(&a);
|
||||||
lv_anim_set_var(&a, tr);
|
lv_anim_set_var(&a, tr);
|
||||||
@ -1582,7 +1577,6 @@ void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
|
|||||||
a.early_apply = 0;
|
a.early_apply = 0;
|
||||||
lv_anim_start(&a);
|
lv_anim_start(&a);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user