mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-27 03:25:28 +08:00
refactor: scr -> screen, act->active, del->delete, remove in obj_clear_flag/state
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
void lv_example_rlottie_1(void)
|
||||
{
|
||||
extern const uint8_t lv_example_rlottie_approve[];
|
||||
lv_obj_t * lottie = lv_rlottie_create_from_raw(lv_scr_act(), 100, 100, (const void *)lv_example_rlottie_approve);
|
||||
lv_obj_t * lottie = lv_rlottie_create_from_raw(lv_screen_active(), 100, 100, (const void *)lv_example_rlottie_approve);
|
||||
lv_obj_center(lottie);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ void lv_example_rlottie_1(void)
|
||||
/*TODO
|
||||
*fallback for online examples*/
|
||||
|
||||
lv_obj_t * label = lv_label_create(lv_scr_act());
|
||||
lv_obj_t * label = lv_label_create(lv_screen_active());
|
||||
lv_label_set_text(label, "Rlottie is not installed");
|
||||
lv_obj_center(label);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ import display_driver
|
||||
#
|
||||
from lv_example_rlottie_approve import lv_example_rlottie_approve
|
||||
|
||||
lottie = lv.rlottie_create_from_raw(lv.scr_act(), 100, 100, lv_example_rlottie_approve)
|
||||
lottie = lv.rlottie_create_from_raw(lv.screen_active(), 100, 100, lv_example_rlottie_approve)
|
||||
lottie.center()
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
void lv_example_rlottie_2(void)
|
||||
{
|
||||
/*The rlottie library uses STDIO file API, so there is no driver letter for LVGL*/
|
||||
lv_obj_t * lottie = lv_rlottie_create_from_file(lv_scr_act(), 100, 100,
|
||||
lv_obj_t * lottie = lv_rlottie_create_from_file(lv_screen_active(), 100, 100,
|
||||
"lvgl/examples/libs/rlottie/lv_example_rlottie_approve.json");
|
||||
lv_obj_center(lottie);
|
||||
}
|
||||
@@ -19,7 +19,7 @@ void lv_example_rlottie_2(void)
|
||||
/*TODO
|
||||
*fallback for online examples*/
|
||||
|
||||
lv_obj_t * label = lv_label_create(lv_scr_act());
|
||||
lv_obj_t * label = lv_label_create(lv_screen_active());
|
||||
lv_label_set_text(label, "Rlottie is not installed");
|
||||
lv_obj_center(label);
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
import lvgl as lv
|
||||
import display_driver
|
||||
|
||||
lottie = lv.rlottie_create_from_file(lv.scr_act(), 100, 100,"lv_example_rlottie_approve.json")
|
||||
lottie = lv.rlottie_create_from_file(lv.screen_active(), 100, 100,"lv_example_rlottie_approve.json")
|
||||
lottie.center()
|
||||
|
||||
Reference in New Issue
Block a user