feat(style) add user_data paramter to lv_style_transition_dsc_init
This commit is contained in:
@@ -47,7 +47,7 @@ void lv_example_btn_2(void)
|
||||
/*Add a transition to the the outline*/
|
||||
static lv_style_transition_dsc_t trans;
|
||||
static lv_style_prop_t props[] = {LV_STYLE_OUTLINE_WIDTH, LV_STYLE_OUTLINE_OPA, 0};
|
||||
lv_style_transition_dsc_init(&trans, props, lv_anim_path_linear, 300, 0);
|
||||
lv_style_transition_dsc_init(&trans, props, lv_anim_path_linear, 300, 0, NULL);
|
||||
|
||||
lv_style_set_transition(&style_pr, &trans);
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ void lv_example_btn_3(void)
|
||||
/*Transition descriptor when going back to the default state.
|
||||
*Add some delay to be sure the press transition is visible even if the press was very short*/
|
||||
static lv_style_transition_dsc_t transition_dsc_def;
|
||||
lv_style_transition_dsc_init(&transition_dsc_def, props, lv_anim_path_overshoot, 250, 100);
|
||||
lv_style_transition_dsc_init(&transition_dsc_def, props, lv_anim_path_overshoot, 250, 100, NULL);
|
||||
|
||||
/*Transition descriptor when going to pressed state.
|
||||
*No delay, go to presses state immediately*/
|
||||
static lv_style_transition_dsc_t transition_dsc_pr;
|
||||
lv_style_transition_dsc_init(&transition_dsc_pr, props, lv_anim_path_ease_in_out, 250, 0);
|
||||
lv_style_transition_dsc_init(&transition_dsc_pr, props, lv_anim_path_ease_in_out, 250, 0, NULL);
|
||||
|
||||
/*Add only the new transition to he default state*/
|
||||
static lv_style_t style_def;
|
||||
|
||||
@@ -10,7 +10,7 @@ void lv_example_imgbtn_1(void)
|
||||
/*Create a transition animation on width transformation and recolor.*/
|
||||
static lv_style_prop_t tr_prop[] = {LV_STYLE_TRANSFORM_WIDTH, LV_STYLE_IMG_RECOLOR_OPA, 0};
|
||||
static lv_style_transition_dsc_t tr;
|
||||
lv_style_transition_dsc_init(&tr, tr_prop, lv_anim_path_linear, 200, 0);
|
||||
lv_style_transition_dsc_init(&tr, tr_prop, lv_anim_path_linear, 200, 0, NULL);
|
||||
|
||||
static lv_style_t style_def;
|
||||
lv_style_init(&style_def);
|
||||
|
||||
@@ -11,7 +11,7 @@ void lv_example_slider_2(void)
|
||||
/*Create a transition*/
|
||||
static const lv_style_prop_t props[] = {LV_STYLE_BG_COLOR, 0};
|
||||
static lv_style_transition_dsc_t transition_dsc;
|
||||
lv_style_transition_dsc_init(&transition_dsc, props, lv_anim_path_linear, 300, 0);
|
||||
lv_style_transition_dsc_init(&transition_dsc, props, lv_anim_path_linear, 300, 0, NULL);
|
||||
|
||||
static lv_style_t style_main;
|
||||
static lv_style_t style_indicator;
|
||||
|
||||
Reference in New Issue
Block a user