mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-27 20:57:01 +08:00
feat(msgbox): add support for formatted text (#9583)
Signed-off-by: James Roy <rruuaanng@outlook.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0a6de47190
commit
043991b59f
@@ -68,6 +68,7 @@ void test_msgbox_creation_successful_modal(void)
|
||||
msgbox = lv_msgbox_create(NULL);
|
||||
lv_msgbox_add_title(msgbox, "The title");
|
||||
lv_msgbox_add_text(msgbox, "The text");
|
||||
lv_msgbox_add_text_fmt(msgbox, "The %s text", "fmt");
|
||||
lv_msgbox_add_footer_button(msgbox, "Apply");
|
||||
lv_msgbox_add_footer_button(msgbox, "Close");
|
||||
lv_msgbox_add_header_button(msgbox, LV_SYMBOL_AUDIO);
|
||||
@@ -87,6 +88,7 @@ void test_msgbox_get_title(void)
|
||||
msgbox = lv_msgbox_create(active_screen);
|
||||
lv_msgbox_add_title(msgbox, "The title");
|
||||
lv_msgbox_add_text(msgbox, "The text");
|
||||
lv_msgbox_add_text_fmt(msgbox, "The %s text", "fmt");
|
||||
lv_msgbox_add_footer_button(msgbox, "Apply");
|
||||
lv_msgbox_add_footer_button(msgbox, "Close");
|
||||
lv_msgbox_add_header_button(msgbox, LV_SYMBOL_AUDIO);
|
||||
@@ -109,6 +111,7 @@ void test_msgbox_close(void)
|
||||
{
|
||||
msgbox = lv_msgbox_create(active_screen);
|
||||
lv_msgbox_add_text(msgbox, "The text");
|
||||
lv_msgbox_add_text_fmt(msgbox, "The %s text", "fmt");
|
||||
|
||||
lv_msgbox_close(msgbox);
|
||||
|
||||
@@ -120,6 +123,7 @@ void test_msgbox_close_modal(void)
|
||||
{
|
||||
msgbox = lv_msgbox_create(NULL);
|
||||
lv_msgbox_add_text(msgbox, "The text");
|
||||
lv_msgbox_add_text_fmt(msgbox, "The %s text", "fmt");
|
||||
|
||||
lv_msgbox_close(msgbox);
|
||||
|
||||
@@ -131,6 +135,7 @@ void test_msgbox_close_async(void)
|
||||
{
|
||||
msgbox = lv_msgbox_create(active_screen);
|
||||
lv_msgbox_add_text(msgbox, "The text");
|
||||
lv_msgbox_add_text_fmt(msgbox, "The %s text", "fmt");
|
||||
|
||||
// lv_msgbox_close deletes the message box
|
||||
TEST_ASSERT_NOT_NULL(msgbox);
|
||||
@@ -140,6 +145,7 @@ void test_msgbox_close_async_modal(void)
|
||||
{
|
||||
msgbox = lv_msgbox_create(NULL);
|
||||
lv_msgbox_add_text(msgbox, "The text");
|
||||
lv_msgbox_add_text_fmt(msgbox, "The %s text", "fmt");
|
||||
|
||||
// lv_msgbox_close deletes the message box
|
||||
TEST_ASSERT_NOT_NULL(msgbox);
|
||||
@@ -151,6 +157,7 @@ void test_msgbox_content_auto_height(void)
|
||||
msgbox = lv_msgbox_create(NULL);
|
||||
lv_msgbox_add_title(msgbox, "The title");
|
||||
lv_msgbox_add_text(msgbox, "The text");
|
||||
lv_msgbox_add_text_fmt(msgbox, "The %s text", "fmt");
|
||||
lv_msgbox_add_footer_button(msgbox, "Apply");
|
||||
lv_msgbox_add_footer_button(msgbox, "Close");
|
||||
lv_msgbox_add_header_button(msgbox, LV_SYMBOL_AUDIO);
|
||||
|
||||
Reference in New Issue
Block a user