1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(stlye): refresh the style on transition start (#6043)

This commit is contained in:
Gabor Kiss-Vamosi 2024-04-12 06:02:34 +02:00 committed by GitHub
parent f78a5761cc
commit 8d4397b864
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -429,6 +429,7 @@ void _lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t
_lv_obj_style_t * style_trans = get_trans_style(obj, part);
lv_style_set_prop((lv_style_t *)style_trans->style, tr_dsc->prop, v1); /*Be sure `trans_style` has a valid value*/
lv_obj_refresh_style(obj, tr_dsc->selector, tr_dsc->prop);
if(tr_dsc->prop == LV_STYLE_RADIUS) {
if(v1.num == LV_RADIUS_CIRCLE || v2.num == LV_RADIUS_CIRCLE) {
@ -906,8 +907,9 @@ static void trans_anim_start_cb(lv_anim_t * a)
tr->prop = prop_tmp;
_lv_obj_style_t * style_trans = get_trans_style(tr->obj, tr->selector);
lv_style_set_prop((lv_style_t *)style_trans->style, tr->prop,
tr->start_value); /*Be sure `trans_style` has a valid value*/
/*Be sure `trans_style` has a valid value*/
lv_style_set_prop((lv_style_t *)style_trans->style, tr->prop, tr->start_value);
lv_obj_refresh_style(tr->obj, tr->selector, tr->prop);
}