![]() |
BSB Developer Docs
|
LVGL label extensions. More...
#include <lvgl.h>Go to the source code of this file.
Functions | |
| void | lv_label_ext_set_anim_speed (lv_obj_t *label, uint32_t px_per_min) |
| Set the scroll animation speed for a label. | |
| void | lv_label_ext_set_max_lines (lv_obj_t *label, uint32_t max_lines) |
| Cap the label's height to N text lines. | |
LVGL label extensions.
| void lv_label_ext_set_anim_speed | ( | lv_obj_t * | label, |
| uint32_t | px_per_min ) |
Set the scroll animation speed for a label.
The scroll distance is computed to match LVGL's internal scroll path.
LV_LABEL_LONG_MODE_SCROLL_CIRCULAR.LV_LABEL_LONG_MODE_DOTS and LV_LABEL_LONG_MODE_WRAP cache a wrap-bounded width, yielding a too-short duration and an overly fast scroll. Call this only while the label is in an expand long mode (CLIP, SCROLL, SCROLL_CIRCULAR) — in practice, after lv_label_set_long_mode, not before.| [in,out] | label | label lvgl object |
| [in] | px_per_min | scroll speed in pixels per minute (must be > 0) |
| void lv_label_ext_set_max_lines | ( | lv_obj_t * | label, |
| uint32_t | max_lines ) |
Cap the label's height to N text lines.
Sets max_height to line_height * max_lines + line_space * (max_lines - 1), computed once at call time from the label's current font.
| [in,out] | label | label lvgl object |
| [in] | max_lines | maximum number of text lines (must be > 0) |