Skip to content

Commit

Permalink
fix(stlye): refresh the style on transition start (#6043)
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor authored Apr 12, 2024
1 parent f78a576 commit 8d4397b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/lv_obj_style.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);

}

Expand Down

0 comments on commit 8d4397b

Please sign in to comment.