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:
Andres O. Vela
2022-02-25 11:54:27 +01:00
committed by GitHub
parent e25fa427d1
commit 340d45cfa9
13 changed files with 118 additions and 11 deletions

View File

@@ -680,6 +680,14 @@ void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value)
lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_OPA, v);
}
void lv_style_set_anim(lv_style_t * style, const lv_anim_t * value)
{
lv_style_value_t v = {
.ptr = value
};
lv_style_set_prop(style, LV_STYLE_ANIM, v);
}
void lv_style_set_anim_time(lv_style_t * style, uint32_t value)
{
lv_style_value_t v = {