feat(text): add text recolor back (#6966)

Co-authored-by: Benign X <1341398182@qq.com>
This commit is contained in:
Carlos Diaz
2024-10-11 22:16:43 -06:00
committed by GitHub
parent da58f2c48e
commit a38e98ef4b
15 changed files with 301 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -615,4 +615,15 @@ void test_label_max_width(void)
TEST_ASSERT_EQUAL_SCREENSHOT("widgets/label_max_width.png");
}
void test_label_with_recolor_cmd(void)
{
lv_obj_clean(lv_screen_active());
lv_obj_t * label_recolor = lv_label_create(lv_screen_active());
lv_label_set_text(label_recolor, "Write a #ff0000 red# word");
lv_label_set_recolor(label_recolor, true);
TEST_ASSERT_EQUAL_SCREENSHOT("widgets/label_recolor.png");
}
#endif