feat(label): added animation style property to apply it to circular scrolling animation of label widget (#3128)
* feat(label): added animation style property to apply it to circular scrolling animation of label widget Added an animation style property to be used as animation template for different use cases in different widgets. This commit implements using this property to set the start and repeat delay of the circular scrolling animation of the label widget. Closes #3097 * fix(label): changed animation style property's var_type to `const lv_anim_t *` * example(label): added example showing how to customize circular scrolling animation * chore(label): ran code-format.py and added missing function prototype to lv_example_widgets.h
This commit is contained in:
@@ -83,6 +83,7 @@ void lv_style_set_clip_corner(lv_style_t * style, bool value);
|
||||
void lv_style_set_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value);
|
||||
void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_anim(lv_style_t * style, const lv_anim_t * value);
|
||||
void lv_style_set_anim_time(lv_style_t * style, uint32_t value);
|
||||
void lv_style_set_anim_speed(lv_style_t * style, uint32_t value);
|
||||
void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value);
|
||||
@@ -515,6 +516,11 @@ void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value);
|
||||
.prop = LV_STYLE_COLOR_FILTER_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ANIM(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ANIM, .value = { .ptr = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ANIM_TIME(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ANIM_TIME, .value = { .num = (int32_t)val } \
|
||||
|
||||
Reference in New Issue
Block a user