diff --git a/demos/music/lv_demo_music_main.c b/demos/music/lv_demo_music_main.c
index 2e84ceed2..d7a6855aa 100644
--- a/demos/music/lv_demo_music_main.c
+++ b/demos/music/lv_demo_music_main.c
@@ -605,7 +605,7 @@ static lv_obj_t * create_ctrl_box(lv_obj_t * parent)
LV_IMAGE_DECLARE(img_lv_demo_music_slider_knob);
slider_obj = lv_slider_create(cont);
- lv_obj_set_style_anim_time(slider_obj, 100, 0);
+ lv_obj_set_style_anim_duration(slider_obj, 100, 0);
lv_obj_add_flag(slider_obj, LV_OBJ_FLAG_CLICKABLE); /*No input from the slider*/
#if LV_DEMO_MUSIC_LARGE == 0
diff --git a/demos/stress/lv_demo_stress.c b/demos/stress/lv_demo_stress.c
index 1c36f479c..c4c2da677 100644
--- a/demos/stress/lv_demo_stress.c
+++ b/demos/stress/lv_demo_stress.c
@@ -165,7 +165,7 @@ static void obj_test_task_cb(lv_timer_t * tmr)
auto_delete(obj, LV_DEMO_STRESS_TIME_STEP * 2 + 70);
obj = lv_slider_create(main_page);
- lv_obj_set_style_anim_time(obj, LV_DEMO_STRESS_TIME_STEP * 8, 0);
+ lv_obj_set_style_anim_duration(obj, LV_DEMO_STRESS_TIME_STEP * 8, 0);
lv_slider_set_value(obj, 5000, LV_ANIM_ON); /*Animate to out of range value*/
auto_delete(obj, LV_DEMO_STRESS_TIME_STEP * 5 + 22);
diff --git a/docs/overview/style-props.md b/docs/overview/style-props.md
index 696624a26..c7a90882b 100644
--- a/docs/overview/style-props.md
+++ b/docs/overview/style-props.md
@@ -253,7 +253,7 @@ Sets the padding between the columns. Used by the layouts.
Properties to describe spacing around an object. Very similar to the margin properties in HTML.
### margin_top
-Sets the margin on the top. The object will keep this space from its siblings in layouts.
+Sets the margin on the top. The object will keep this space from its siblings in layouts.
- Default 0
- Inherited No
@@ -469,7 +469,7 @@ Sets whether the border should be drawn before or after the children are drawn.
Properties to describe the outline. It's like a border but drawn outside of the rectangles.
### outline_width
-Set the width of the outline in pixels.
+Set the width of the outline in pixels.
- Default 0
- Inherited No
@@ -517,7 +517,7 @@ Set the width of the shadow in pixels. The value should be >= 0.
### shadow_offset_x
-Set an offset on the shadow in pixels in X direction.
+Set an offset on the shadow in pixels in X direction.
- Default 0
- Inherited No
@@ -526,7 +526,7 @@ Set an offset on the shadow in pixels in X direction.
### shadow_offset_y
-Set an offset on the shadow in pixels in Y direction.
+Set an offset on the shadow in pixels in Y direction.
- Default 0
- Inherited No
@@ -622,7 +622,7 @@ Set the gap between dashes in pixel. Note that dash works only on horizontal and
### line_rounded
-Make the end points of the lines rounded. `true`: rounded, `false`: perpendicular line ending
+Make the end points of the lines rounded. `true`: rounded, `false`: perpendicular line ending
- Default 0
- Inherited No
@@ -661,7 +661,7 @@ Set the width (thickness) of the arcs in pixel.
### arc_rounded
-Make the end points of the arcs rounded. `true`: rounded, `false`: perpendicular line ending
+Make the end points of the arcs rounded. `true`: rounded, `false`: perpendicular line ending
- Default 0
- Inherited No
@@ -718,7 +718,7 @@ Set the opacity of the text. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully
### text_font
-Set the font of the text (a pointer `lv_font_t *`).
+Set the font of the text (a pointer `lv_font_t *`).
- Default `LV_FONT_DEFAULT`
- Inherited Yes
@@ -828,8 +828,8 @@ The animation template for the object's animation. Should be a pointer to `lv_an
- Ext. draw No
-### anim_time
-The animation time in milliseconds. Its meaning is widget specific. E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more.
+### anim_duration
+The animation duration in milliseconds. Its meaning is widget specific. E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more.
- Default 0
- Inherited No
diff --git a/examples/widgets/bar/lv_example_bar_2.c b/examples/widgets/bar/lv_example_bar_2.c
index c7401939a..108022931 100644
--- a/examples/widgets/bar/lv_example_bar_2.c
+++ b/examples/widgets/bar/lv_example_bar_2.c
@@ -14,7 +14,7 @@ void lv_example_bar_2(void)
lv_style_set_border_width(&style_bg, 2);
lv_style_set_pad_all(&style_bg, 6); /*To make the indicator smaller*/
lv_style_set_radius(&style_bg, 6);
- lv_style_set_anim_time(&style_bg, 1000);
+ lv_style_set_anim_duration(&style_bg, 1000);
lv_style_init(&style_indic);
lv_style_set_bg_opa(&style_indic, LV_OPA_COVER);
diff --git a/examples/widgets/slider/lv_example_slider_1.c b/examples/widgets/slider/lv_example_slider_1.c
index 8d170c5b6..bcb20fb8c 100644
--- a/examples/widgets/slider/lv_example_slider_1.c
+++ b/examples/widgets/slider/lv_example_slider_1.c
@@ -14,7 +14,7 @@ void lv_example_slider_1(void)
lv_obj_center(slider);
lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
- lv_obj_set_style_anim_time(slider, 2000, 0);
+ lv_obj_set_style_anim_duration(slider, 2000, 0);
/*Create a label below the slider*/
slider_label = lv_label_create(lv_screen_active());
lv_label_set_text(slider_label, "0%");
diff --git a/scripts/style_api_gen.py b/scripts/style_api_gen.py
index e54768d3d..bd1612271 100755
--- a/scripts/style_api_gen.py
+++ b/scripts/style_api_gen.py
@@ -369,9 +369,9 @@ props = [
'style_type': 'ptr', 'var_type': 'const lv_anim_t *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
'dsc': "The animation template for the object's animation. Should be a pointer to `lv_anim_t`. The animation parameters are widget specific, e.g. animation time could be the E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more."},
-{'name': 'ANIM_TIME',
+{'name': 'ANIM_DURATION',
'style_type': 'num', 'var_type': 'uint32_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
- 'dsc': "The animation time in milliseconds. Its meaning is widget specific. E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more."},
+ 'dsc': "The animation duration in milliseconds. Its meaning is widget specific. E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more."},
{'name': 'TRANSITION',
'style_type': 'ptr', 'var_type': 'const lv_style_transition_dsc_t *' , 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
diff --git a/src/core/lv_obj_style_gen.c b/src/core/lv_obj_style_gen.c
index 966fbd953..489962205 100644
--- a/src/core/lv_obj_style_gen.c
+++ b/src/core/lv_obj_style_gen.c
@@ -690,7 +690,8 @@ void lv_obj_set_style_opa_layered(lv_obj_t * obj, lv_opa_t value, lv_style_selec
lv_obj_set_local_style_prop(obj, LV_STYLE_OPA_LAYERED, v, selector);
}
-void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector)
+void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_color_filter_dsc_t * value,
+ lv_style_selector_t selector)
{
lv_style_value_t v = {
.ptr = value
@@ -714,12 +715,12 @@ void lv_obj_set_style_anim(lv_obj_t * obj, const lv_anim_t * value, lv_style_sel
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM, v, selector);
}
-void lv_obj_set_style_anim_time(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
+void lv_obj_set_style_anim_duration(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
{
lv_style_value_t v = {
.num = (int32_t)value
};
- lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_TIME, v, selector);
+ lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_DURATION, v, selector);
}
void lv_obj_set_style_transition(lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector)
diff --git a/src/core/lv_obj_style_gen.h b/src/core/lv_obj_style_gen.h
index 1bb64abdb..a8d67e837 100644
--- a/src/core/lv_obj_style_gen.h
+++ b/src/core/lv_obj_style_gen.h
@@ -6,7 +6,6 @@
**********************************************************************
*/
-
#ifndef LV_OBJ_STYLE_GEN_H
#define LV_OBJ_STYLE_GEN_H
@@ -226,7 +225,8 @@ static inline lv_color_t lv_obj_get_style_bg_grad_color(const lv_obj_t * obj, ui
static inline lv_color_t lv_obj_get_style_bg_grad_color_filtered(const lv_obj_t * obj, uint32_t part)
{
- lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_COLOR));
+ lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part,
+ LV_STYLE_BG_GRAD_COLOR));
return v.color;
}
@@ -286,7 +286,8 @@ static inline lv_color_t lv_obj_get_style_bg_image_recolor(const lv_obj_t * obj,
static inline lv_color_t lv_obj_get_style_bg_image_recolor_filtered(const lv_obj_t * obj, uint32_t part)
{
- lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_RECOLOR));
+ lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part,
+ LV_STYLE_BG_IMAGE_RECOLOR));
return v.color;
}
@@ -310,7 +311,8 @@ static inline lv_color_t lv_obj_get_style_border_color(const lv_obj_t * obj, uin
static inline lv_color_t lv_obj_get_style_border_color_filtered(const lv_obj_t * obj, uint32_t part)
{
- lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR));
+ lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part,
+ LV_STYLE_BORDER_COLOR));
return v.color;
}
@@ -352,7 +354,8 @@ static inline lv_color_t lv_obj_get_style_outline_color(const lv_obj_t * obj, ui
static inline lv_color_t lv_obj_get_style_outline_color_filtered(const lv_obj_t * obj, uint32_t part)
{
- lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR));
+ lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part,
+ LV_STYLE_OUTLINE_COLOR));
return v.color;
}
@@ -400,7 +403,8 @@ static inline lv_color_t lv_obj_get_style_shadow_color(const lv_obj_t * obj, uin
static inline lv_color_t lv_obj_get_style_shadow_color_filtered(const lv_obj_t * obj, uint32_t part)
{
- lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR));
+ lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part,
+ LV_STYLE_SHADOW_COLOR));
return v.color;
}
@@ -424,7 +428,8 @@ static inline lv_color_t lv_obj_get_style_image_recolor(const lv_obj_t * obj, ui
static inline lv_color_t lv_obj_get_style_image_recolor_filtered(const lv_obj_t * obj, uint32_t part)
{
- lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_RECOLOR));
+ lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part,
+ LV_STYLE_IMAGE_RECOLOR));
return v.color;
}
@@ -602,9 +607,9 @@ static inline const lv_anim_t * lv_obj_get_style_anim(const lv_obj_t * obj, uint
return (const lv_anim_t *)v.ptr;
}
-static inline uint32_t lv_obj_get_style_anim_time(const lv_obj_t * obj, uint32_t part)
+static inline uint32_t lv_obj_get_style_anim_duration(const lv_obj_t * obj, uint32_t part)
{
- lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_TIME);
+ lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_DURATION);
return (uint32_t)v.num;
}
@@ -815,36 +820,36 @@ void lv_obj_set_style_radius(lv_obj_t * obj, int32_t value, lv_style_selector_t
void lv_obj_set_style_clip_corner(lv_obj_t * obj, bool value, lv_style_selector_t selector);
void lv_obj_set_style_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
void lv_obj_set_style_opa_layered(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
-void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector);
+void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_color_filter_dsc_t * value,
+ lv_style_selector_t selector);
void lv_obj_set_style_color_filter_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
void lv_obj_set_style_anim(lv_obj_t * obj, const lv_anim_t * value, lv_style_selector_t selector);
-void lv_obj_set_style_anim_time(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
+void lv_obj_set_style_anim_duration(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
void lv_obj_set_style_transition(lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector);
void lv_obj_set_style_blend_mode(lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector);
void lv_obj_set_style_layout(lv_obj_t * obj, uint16_t value, lv_style_selector_t selector);
void lv_obj_set_style_base_dir(lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector);
#if LV_USE_FLEX
-void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector);
-void lv_obj_set_style_flex_main_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
-void lv_obj_set_style_flex_cross_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
-void lv_obj_set_style_flex_track_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
-void lv_obj_set_style_flex_grow(lv_obj_t * obj, uint8_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_flex_main_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_flex_cross_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_flex_track_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_flex_grow(lv_obj_t * obj, uint8_t value, lv_style_selector_t selector);
#endif /*LV_USE_FLEX*/
#if LV_USE_GRID
-void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector);
-void lv_obj_set_style_grid_column_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
-void lv_obj_set_style_grid_row_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector);
-void lv_obj_set_style_grid_row_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
-void lv_obj_set_style_grid_cell_column_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
-void lv_obj_set_style_grid_cell_x_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
-void lv_obj_set_style_grid_cell_column_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
-void lv_obj_set_style_grid_cell_row_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
-void lv_obj_set_style_grid_cell_y_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
-void lv_obj_set_style_grid_cell_row_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector);
+ void lv_obj_set_style_grid_column_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_grid_row_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector);
+ void lv_obj_set_style_grid_row_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_grid_cell_column_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_grid_cell_x_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_grid_cell_column_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_grid_cell_row_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_grid_cell_y_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
+ void lv_obj_set_style_grid_cell_row_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
#endif /*LV_USE_GRID*/
-
#endif /* LV_OBJ_STYLE_GEN_H */
diff --git a/src/lv_api_map.h b/src/lv_api_map.h
index 226444af2..be6ba6f2a 100644
--- a/src/lv_api_map.h
+++ b/src/lv_api_map.h
@@ -236,6 +236,17 @@ static inline void lv_obj_move_background(lv_obj_t * obj)
#define lv_obj_get_child_cnt lv_obj_get_child_count
#define lv_obj_get_disp lv_obj_get_display
+#define LV_STYLE_ANIM_TIME LV_STYLE_ANIM_DURATION
+#define LV_STYLE_IMG_OPA LV_STYLE_IMAGE_OPA
+#define LV_STYLE_IMG_RECOLOR LV_STYLE_IMAGE_RECOLOR
+#define LV_STYLE_IMG_RECOLOR_FILTERED LV_STYLE_IMAGE_RECOLOR_FILTERED
+#define LV_STYLE_IMG_RECOLOR_OPA LV_STYLE_IMAGE_RECOLOR_OPA
+#define LV_STYLE_SHADOW_OFS_X LV_STYLE_SHADOW_OFFSET_X
+#define LV_STYLE_SHADOW_OFS_Y LV_STYLE_SHADOW_OFFSET_Y
+#define LV_STYLE_TRANSFORM_ZOOM LV_STYLE_TRANSFORM_SCALE
+#define LV_STYLE_TRANSFORM_ANGLE LV_STYLE_TRANSFORM_ROTATION
+
+#define lv_obj_get_style_anim_time lv_obj_get_style_anim_duration
#define lv_obj_get_style_img_opa lv_obj_get_style_image_opa
#define lv_obj_get_style_img_recolor lv_obj_get_style_image_recolor
#define lv_obj_get_style_img_recolor_filtered lv_obj_get_style_image_recolor_filtered
@@ -245,6 +256,7 @@ static inline void lv_obj_move_background(lv_obj_t * obj)
#define lv_obj_get_style_transform_zoom lv_obj_get_style_transform_scale
#define lv_obj_get_style_transform_angle lv_obj_get_style_transform_rotation
+#define lv_obj_set_style_anim_time lv_obj_set_style_anim_duration
#define lv_obj_set_style_img_opa lv_obj_set_style_image_opa
#define lv_obj_set_style_img_recolor lv_obj_set_style_image_recolor
#define lv_obj_set_style_img_recolor_opa lv_obj_set_style_image_recolor_opa
@@ -253,6 +265,7 @@ static inline void lv_obj_move_background(lv_obj_t * obj)
#define lv_obj_set_style_transform_zoom lv_obj_set_style_transform_scale
#define lv_obj_set_style_transform_angle lv_obj_set_style_transform_rotation
+#define lv_style_set_anim_time lv_style_set_anim_duration
#define lv_style_set_img_opa lv_style_set_image_opa
#define lv_style_set_img_recolor lv_style_set_image_recolor
#define lv_style_set_img_recolor_opa lv_style_set_image_recolor_opa
diff --git a/src/misc/lv_style.c b/src/misc/lv_style.c
index da844106f..276746160 100644
--- a/src/misc/lv_style.c
+++ b/src/misc/lv_style.c
@@ -131,7 +131,7 @@ const uint8_t _lv_style_builtin_prop_flag_lookup_table[_LV_STYLE_NUM_BUILT_IN_PR
[LV_STYLE_OPA_LAYERED] = LV_STYLE_PROP_FLAG_LAYER_UPDATE,
[LV_STYLE_COLOR_FILTER_DSC] = LV_STYLE_PROP_FLAG_INHERITABLE,
[LV_STYLE_COLOR_FILTER_OPA] = LV_STYLE_PROP_FLAG_INHERITABLE,
- [LV_STYLE_ANIM_TIME] = 0,
+ [LV_STYLE_ANIM_DURATION] = 0,
[LV_STYLE_TRANSITION] = 0,
[LV_STYLE_BLEND_MODE] = LV_STYLE_PROP_FLAG_LAYER_UPDATE,
[LV_STYLE_LAYOUT] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE,
diff --git a/src/misc/lv_style.h b/src/misc/lv_style.h
index ecad5fe6a..7e5ed75be 100644
--- a/src/misc/lv_style.h
+++ b/src/misc/lv_style.h
@@ -284,7 +284,7 @@ enum _lv_style_prop_t {
LV_STYLE_COLOR_FILTER_DSC = 97,
LV_STYLE_COLOR_FILTER_OPA = 98,
LV_STYLE_ANIM = 99,
- LV_STYLE_ANIM_TIME = 100,
+ LV_STYLE_ANIM_DURATION = 100,
LV_STYLE_TRANSITION = 102,
LV_STYLE_BLEND_MODE = 103,
LV_STYLE_TRANSFORM_WIDTH = 104,
diff --git a/src/misc/lv_style_gen.c b/src/misc/lv_style_gen.c
index 6abca8b1d..c0aacab0b 100644
--- a/src/misc/lv_style_gen.c
+++ b/src/misc/lv_style_gen.c
@@ -888,15 +888,15 @@ void lv_style_set_anim(lv_style_t * style, const lv_anim_t * value)
const lv_style_prop_t _lv_style_const_prop_id_ANIM = LV_STYLE_ANIM;
-void lv_style_set_anim_time(lv_style_t * style, uint32_t value)
+void lv_style_set_anim_duration(lv_style_t * style, uint32_t value)
{
lv_style_value_t v = {
.num = (int32_t)value
};
- lv_style_set_prop(style, LV_STYLE_ANIM_TIME, v);
+ lv_style_set_prop(style, LV_STYLE_ANIM_DURATION, v);
}
-const lv_style_prop_t _lv_style_const_prop_id_ANIM_TIME = LV_STYLE_ANIM_TIME;
+const lv_style_prop_t _lv_style_const_prop_id_ANIM_DURATION = LV_STYLE_ANIM_DURATION;
void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value)
{
diff --git a/src/misc/lv_style_gen.h b/src/misc/lv_style_gen.h
index afce82a07..f02553f87 100644
--- a/src/misc/lv_style_gen.h
+++ b/src/misc/lv_style_gen.h
@@ -185,8 +185,8 @@ void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value);
LV_ATTRIBUTE_EXTERN_DATA extern const lv_style_prop_t _lv_style_const_prop_id_COLOR_FILTER_OPA;
void lv_style_set_anim(lv_style_t * style, const lv_anim_t * value);
LV_ATTRIBUTE_EXTERN_DATA extern const lv_style_prop_t _lv_style_const_prop_id_ANIM;
-void lv_style_set_anim_time(lv_style_t * style, uint32_t value);
-LV_ATTRIBUTE_EXTERN_DATA extern const lv_style_prop_t _lv_style_const_prop_id_ANIM_TIME;
+void lv_style_set_anim_duration(lv_style_t * style, uint32_t value);
+LV_ATTRIBUTE_EXTERN_DATA extern const lv_style_prop_t _lv_style_const_prop_id_ANIM_DURATION;
void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value);
LV_ATTRIBUTE_EXTERN_DATA extern const lv_style_prop_t _lv_style_const_prop_id_TRANSITION;
void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value);
@@ -673,9 +673,9 @@ LV_ATTRIBUTE_EXTERN_DATA extern const lv_style_prop_t _lv_style_const_prop_id_BA
.prop_ptr = &_lv_style_const_prop_id_ANIM, .value = { .ptr = val } \
}
-#define LV_STYLE_CONST_ANIM_TIME(val) \
+#define LV_STYLE_CONST_ANIM_DURATION(val) \
{ \
- .prop_ptr = &_lv_style_const_prop_id_ANIM_TIME, .value = { .num = (int32_t)val } \
+ .prop_ptr = &_lv_style_const_prop_id_ANIM_DURATION, .value = { .num = (int32_t)val } \
}
#define LV_STYLE_CONST_TRANSITION(val) \
diff --git a/src/themes/default/lv_theme_default.c b/src/themes/default/lv_theme_default.c
index 864f8e2e9..a6a5eb242 100644
--- a/src/themes/default/lv_theme_default.c
+++ b/src/themes/default/lv_theme_default.c
@@ -399,10 +399,10 @@ static void style_init(my_theme_t * theme)
lv_style_set_radius(&theme->styles.knob, LV_RADIUS_CIRCLE);
style_init_reset(&theme->styles.anim);
- lv_style_set_anim_time(&theme->styles.anim, 200);
+ lv_style_set_anim_duration(&theme->styles.anim, 200);
style_init_reset(&theme->styles.anim_fast);
- lv_style_set_anim_time(&theme->styles.anim_fast, 120);
+ lv_style_set_anim_duration(&theme->styles.anim_fast, 120);
#if LV_USE_ARC
style_init_reset(&theme->styles.arc_indic);
@@ -540,7 +540,7 @@ static void style_init(my_theme_t * theme)
lv_style_set_border_width(&theme->styles.ta_cursor, _LV_DPX_CALC(theme->disp_dpi, 2));
lv_style_set_pad_left(&theme->styles.ta_cursor, - _LV_DPX_CALC(theme->disp_dpi, 1));
lv_style_set_border_side(&theme->styles.ta_cursor, LV_BORDER_SIDE_LEFT);
- lv_style_set_anim_time(&theme->styles.ta_cursor, 400);
+ lv_style_set_anim_duration(&theme->styles.ta_cursor, 400);
style_init_reset(&theme->styles.ta_placeholder);
lv_style_set_text_color(&theme->styles.ta_placeholder,
diff --git a/src/themes/mono/lv_theme_mono.c b/src/themes/mono/lv_theme_mono.c
index 6ff54238d..fdcf11dcb 100644
--- a/src/themes/mono/lv_theme_mono.c
+++ b/src/themes/mono/lv_theme_mono.c
@@ -111,7 +111,7 @@ static void style_init(my_theme_t * theme, bool dark_bg, const lv_font_t * font)
lv_style_set_arc_width(&theme->styles.card, 2);
lv_style_set_arc_color(&theme->styles.card, COLOR_FG);
lv_style_set_outline_color(&theme->styles.card, COLOR_FG);
- lv_style_set_anim_time(&theme->styles.card, 300);
+ lv_style_set_anim_duration(&theme->styles.card, 300);
style_init_reset(&theme->styles.pr);
lv_style_set_border_width(&theme->styles.pr, BORDER_W_PR);
@@ -163,7 +163,7 @@ static void style_init(my_theme_t * theme, bool dark_bg, const lv_font_t * font)
lv_style_set_border_color(&theme->styles.ta_cursor, COLOR_FG);
lv_style_set_border_width(&theme->styles.ta_cursor, 2);
lv_style_set_bg_opa(&theme->styles.ta_cursor, LV_OPA_TRANSP);
- lv_style_set_anim_time(&theme->styles.ta_cursor, 500);
+ lv_style_set_anim_duration(&theme->styles.ta_cursor, 500);
#endif
#if LV_USE_CHART
diff --git a/src/themes/simple/lv_theme_simple.c b/src/themes/simple/lv_theme_simple.c
index 235a25ad3..6eb2b2c9c 100644
--- a/src/themes/simple/lv_theme_simple.c
+++ b/src/themes/simple/lv_theme_simple.c
@@ -133,7 +133,7 @@ static void style_init(my_theme_t * theme)
lv_style_set_border_color(&theme->styles.ta_cursor, COLOR_DIM);
lv_style_set_border_width(&theme->styles.ta_cursor, 2);
lv_style_set_bg_opa(&theme->styles.ta_cursor, LV_OPA_TRANSP);
- lv_style_set_anim_time(&theme->styles.ta_cursor, 500);
+ lv_style_set_anim_duration(&theme->styles.ta_cursor, 500);
#endif
}
diff --git a/src/widgets/bar/lv_bar.c b/src/widgets/bar/lv_bar.c
index 51274735a..117c876b4 100644
--- a/src/widgets/bar/lv_bar.c
+++ b/src/widgets/bar/lv_bar.c
@@ -646,7 +646,7 @@ static void lv_bar_set_value_with_anim(lv_obj_t * obj, int32_t new_value, int32_
lv_anim_set_exec_cb(&a, lv_bar_anim);
lv_anim_set_values(&a, LV_BAR_ANIM_STATE_START, LV_BAR_ANIM_STATE_END);
lv_anim_set_ready_cb(&a, lv_bar_anim_ready);
- lv_anim_set_duration(&a, lv_obj_get_style_anim_time(obj, LV_PART_MAIN));
+ lv_anim_set_duration(&a, lv_obj_get_style_anim_duration(obj, LV_PART_MAIN));
lv_anim_start(&a);
}
}
diff --git a/src/widgets/label/lv_label.c b/src/widgets/label/lv_label.c
index dafa07ca6..363f0275c 100644
--- a/src/widgets/label/lv_label.c
+++ b/src/widgets/label/lv_label.c
@@ -869,7 +869,7 @@ static void lv_label_refr_text(lv_obj_t * obj)
/*In scroll mode start an offset animation*/
if(label->long_mode == LV_LABEL_LONG_SCROLL) {
const lv_anim_t * anim_template = lv_obj_get_style_anim(obj, LV_PART_MAIN);
- uint32_t anim_time = lv_obj_get_style_anim_time(obj, LV_PART_MAIN);
+ uint32_t anim_time = lv_obj_get_style_anim_duration(obj, LV_PART_MAIN);
if(anim_time == 0) anim_time = LV_LABEL_DEF_SCROLL_SPEED;
lv_anim_t a;
lv_anim_init(&a);
@@ -980,7 +980,7 @@ static void lv_label_refr_text(lv_obj_t * obj)
/*In roll inf. mode keep the size but start offset animations*/
else if(label->long_mode == LV_LABEL_LONG_SCROLL_CIRCULAR) {
const lv_anim_t * anim_template = lv_obj_get_style_anim(obj, LV_PART_MAIN);
- uint32_t anim_time = lv_obj_get_style_anim_time(obj, LV_PART_MAIN);
+ uint32_t anim_time = lv_obj_get_style_anim_duration(obj, LV_PART_MAIN);
if(anim_time == 0) anim_time = LV_LABEL_DEF_SCROLL_SPEED;
lv_anim_t a;
lv_anim_init(&a);
diff --git a/src/widgets/roller/lv_roller.c b/src/widgets/roller/lv_roller.c
index 11b64f96d..70a4f5ed6 100644
--- a/src/widgets/roller/lv_roller.c
+++ b/src/widgets/roller/lv_roller.c
@@ -597,7 +597,7 @@ static void refr_position(lv_obj_t * obj, lv_anim_enable_t anim_en)
const int32_t line_space = lv_obj_get_style_text_line_space(obj, LV_PART_MAIN);
const int32_t font_h = lv_font_get_line_height(font);
const int32_t h = lv_obj_get_content_height(obj);
- uint32_t anim_time = lv_obj_get_style_anim_time(obj, LV_PART_MAIN);
+ uint32_t anim_time = lv_obj_get_style_anim_duration(obj, LV_PART_MAIN);
/*Normally the animation's `end_cb` sets correct position of the roller if infinite.
*But without animations we have to do it manually*/
diff --git a/src/widgets/switch/lv_switch.c b/src/widgets/switch/lv_switch.c
index 5c082cdea..40e3108d2 100644
--- a/src/widgets/switch/lv_switch.c
+++ b/src/widgets/switch/lv_switch.c
@@ -228,7 +228,7 @@ static void lv_switch_trigger_anim(lv_obj_t * obj)
LV_ASSERT_OBJ(obj, MY_CLASS);
lv_switch_t * sw = (lv_switch_t *)obj;
- uint32_t anim_dur_full = lv_obj_get_style_anim_time(obj, LV_PART_MAIN);
+ uint32_t anim_dur_full = lv_obj_get_style_anim_duration(obj, LV_PART_MAIN);
if(anim_dur_full > 0) {
bool chk = lv_obj_get_state(obj) & LV_STATE_CHECKED;
diff --git a/src/widgets/textarea/lv_textarea.c b/src/widgets/textarea/lv_textarea.c
index 36fea346c..85dce9503 100644
--- a/src/widgets/textarea/lv_textarea.c
+++ b/src/widgets/textarea/lv_textarea.c
@@ -1039,7 +1039,7 @@ static bool char_is_accepted(lv_obj_t * obj, uint32_t c)
static void start_cursor_blink(lv_obj_t * obj)
{
lv_textarea_t * ta = (lv_textarea_t *)obj;
- uint32_t blink_time = lv_obj_get_style_anim_time(obj, LV_PART_CURSOR);
+ uint32_t blink_time = lv_obj_get_style_anim_duration(obj, LV_PART_CURSOR);
if(blink_time == 0) {
lv_anim_delete(obj, cursor_blink_anim_cb);
ta->cursor.show = 1;