Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(stlye): refresh the style on transition start
  • Loading branch information
kisvegabor committed Apr 8, 2024
commit 5a7e0988e67c6d11bb6fb458867d3750ba80daed
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
Loading