fix(label): use LV_LABEL_LONG_MODE_* instead of LV_LABEL_LONG_*
This commit is contained in:
@@ -75,7 +75,7 @@ void lv_example_style_16(void)
|
||||
lv_obj_t * label = lv_label_create(lv_screen_active());
|
||||
lv_obj_set_width(label, LV_PCT(80));
|
||||
lv_label_set_text(label, "LV_USE_DRAW_SW_COMPLEX_GRADIENTS is not enabled");
|
||||
lv_label_set_long_mode(label, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
lv_label_set_long_mode(label, LV_LABEL_LONG_MODE_SCROLL_CIRCULAR);
|
||||
lv_obj_center(label);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ void lv_example_style_17(void)
|
||||
lv_obj_t * label = lv_label_create(lv_screen_active());
|
||||
lv_obj_set_width(label, LV_PCT(80));
|
||||
lv_label_set_text(label, "LV_USE_DRAW_SW_COMPLEX_GRADIENTS is not enabled");
|
||||
lv_label_set_long_mode(label, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
lv_label_set_long_mode(label, LV_LABEL_LONG_MODE_SCROLL_CIRCULAR);
|
||||
lv_obj_center(label);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ void lv_example_style_18(void)
|
||||
lv_obj_t * label = lv_label_create(lv_screen_active());
|
||||
lv_obj_set_width(label, LV_PCT(80));
|
||||
lv_label_set_text(label, "LV_USE_DRAW_SW_COMPLEX_GRADIENTS is not enabled");
|
||||
lv_label_set_long_mode(label, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
lv_label_set_long_mode(label, LV_LABEL_LONG_MODE_SCROLL_CIRCULAR);
|
||||
lv_obj_center(label);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
void lv_example_label_1(void)
|
||||
{
|
||||
lv_obj_t * label1 = lv_label_create(lv_screen_active());
|
||||
lv_label_set_long_mode(label1, LV_LABEL_LONG_WRAP); /*Break the long lines*/
|
||||
lv_label_set_long_mode(label1, LV_LABEL_LONG_MODE_WRAP); /*Break the long lines*/
|
||||
lv_label_set_text(label1, "Recolor is not supported for v9 now.");
|
||||
lv_obj_set_width(label1, 150); /*Set smaller width to make the lines wrap*/
|
||||
lv_obj_set_style_text_align(label1, LV_TEXT_ALIGN_CENTER, 0);
|
||||
lv_obj_align(label1, LV_ALIGN_CENTER, 0, -40);
|
||||
|
||||
lv_obj_t * label2 = lv_label_create(lv_screen_active());
|
||||
lv_label_set_long_mode(label2, LV_LABEL_LONG_SCROLL_CIRCULAR); /*Circular scroll*/
|
||||
lv_label_set_long_mode(label2, LV_LABEL_LONG_MODE_SCROLL_CIRCULAR); /*Circular scroll*/
|
||||
lv_obj_set_width(label2, 150);
|
||||
lv_label_set_text(label2, "It is a circularly scrolling text. ");
|
||||
lv_obj_align(label2, LV_ALIGN_CENTER, 0, 40);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#if LV_USE_LABEL && LV_BUILD_EXAMPLES
|
||||
|
||||
/**
|
||||
* Show customizing the circular scrolling animation of a label with `LV_LABEL_LONG_SCROLL_CIRCULAR`
|
||||
* Show customizing the circular scrolling animation of a label with `LV_LABEL_LONG_MODE_SCROLL_CIRCULAR`
|
||||
* long mode.
|
||||
*/
|
||||
void lv_example_label_5(void)
|
||||
@@ -20,7 +20,7 @@ void lv_example_label_5(void)
|
||||
lv_style_set_anim(&label_style, &animation_template);
|
||||
|
||||
lv_obj_t * label1 = lv_label_create(lv_screen_active());
|
||||
lv_label_set_long_mode(label1, LV_LABEL_LONG_SCROLL_CIRCULAR); /*Circular scroll*/
|
||||
lv_label_set_long_mode(label1, LV_LABEL_LONG_MODE_SCROLL_CIRCULAR); /*Circular scroll*/
|
||||
lv_obj_set_width(label1, 150);
|
||||
lv_label_set_text(label1, "It is a circularly scrolling text. ");
|
||||
lv_obj_align(label1, LV_ALIGN_CENTER, 0, 40);
|
||||
|
||||
@@ -159,7 +159,7 @@ static lv_obj_t * create_text(lv_obj_t * parent, const char * icon, const char *
|
||||
if(txt) {
|
||||
label = lv_label_create(obj);
|
||||
lv_label_set_text(label, txt);
|
||||
lv_label_set_long_mode(label, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
lv_label_set_long_mode(label, LV_LABEL_LONG_MODE_SCROLL_CIRCULAR);
|
||||
lv_obj_set_flex_grow(label, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user