fix(style) rename path_cb to to path_xcb in lv_style_transition_dsc_t
This way the MicroPython won't allow manually setting this field. And it can't be set manually becasue the user data needs to be set too. So lv_style_transition_dsc_init() should be used to initialize the fields of lv_style_transition_dsc_t
This commit is contained in:
@@ -1009,7 +1009,7 @@ static void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
|
||||
if(t == tsi) {
|
||||
ts[tsi].time = tr->time;
|
||||
ts[tsi].delay = tr->delay;
|
||||
ts[tsi].path_cb = tr->path_cb;
|
||||
ts[tsi].path_cb = tr->path_xcb;
|
||||
ts[tsi].prop = tr->props[j];
|
||||
#if LV_USE_USER_DATA
|
||||
ts[tsi].user_data = tr->user_data;
|
||||
|
||||
@@ -202,7 +202,7 @@ void lv_style_transition_dsc_init(lv_style_transition_dsc_t * tr, const lv_style
|
||||
{
|
||||
lv_memset_00(tr, sizeof(lv_style_transition_dsc_t));
|
||||
tr->props = props;
|
||||
tr->path_cb = path_cb == NULL ? lv_anim_path_linear : path_cb;
|
||||
tr->path_xcb = path_cb == NULL ? lv_anim_path_linear : path_cb;
|
||||
tr->time = time;
|
||||
tr->delay = delay;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ typedef struct _lv_style_transiton_t {
|
||||
#if LV_USE_USER_DATA
|
||||
void * user_data; /**< A custom user data that will be passed to the animation's user_data */
|
||||
#endif
|
||||
lv_anim_path_cb_t path_cb; /**< A path for the animation.*/
|
||||
lv_anim_path_cb_t path_xcb; /**< A path for the animation.*/
|
||||
uint32_t time; /**< Duration of the transition in [ms]*/
|
||||
uint32_t delay; /**< Delay before the transition in [ms]*/
|
||||
}lv_style_transition_dsc_t;
|
||||
|
||||
Reference in New Issue
Block a user