mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-26 19:15:38 +08:00
refactor: scr -> screen, act->active, del->delete, remove in obj_clear_flag/state
This commit is contained in:
@@ -16,7 +16,7 @@ void lv_example_dropdown_1(void)
|
||||
{
|
||||
|
||||
/*Create a normal drop down list*/
|
||||
lv_obj_t * dd = lv_dropdown_create(lv_scr_act());
|
||||
lv_obj_t * dd = lv_dropdown_create(lv_screen_active());
|
||||
lv_dropdown_set_options(dd, "Apple\n"
|
||||
"Banana\n"
|
||||
"Orange\n"
|
||||
|
||||
@@ -8,7 +8,7 @@ def event_handler(e):
|
||||
print("Option: \"%s\"" % option.strip())
|
||||
|
||||
# Create a normal drop down list
|
||||
dd = lv.dropdown(lv.scr_act())
|
||||
dd = lv.dropdown(lv.screen_active())
|
||||
dd.set_options("\n".join([
|
||||
"Apple",
|
||||
"Banana",
|
||||
|
||||
@@ -13,23 +13,23 @@ void lv_example_dropdown_2(void)
|
||||
"Melon";
|
||||
|
||||
lv_obj_t * dd;
|
||||
dd = lv_dropdown_create(lv_scr_act());
|
||||
dd = lv_dropdown_create(lv_screen_active());
|
||||
lv_dropdown_set_options_static(dd, opts);
|
||||
lv_obj_align(dd, LV_ALIGN_TOP_MID, 0, 10);
|
||||
|
||||
dd = lv_dropdown_create(lv_scr_act());
|
||||
dd = lv_dropdown_create(lv_screen_active());
|
||||
lv_dropdown_set_options_static(dd, opts);
|
||||
lv_dropdown_set_dir(dd, LV_DIR_BOTTOM);
|
||||
lv_dropdown_set_symbol(dd, LV_SYMBOL_UP);
|
||||
lv_obj_align(dd, LV_ALIGN_BOTTOM_MID, 0, -10);
|
||||
|
||||
dd = lv_dropdown_create(lv_scr_act());
|
||||
dd = lv_dropdown_create(lv_screen_active());
|
||||
lv_dropdown_set_options_static(dd, opts);
|
||||
lv_dropdown_set_dir(dd, LV_DIR_RIGHT);
|
||||
lv_dropdown_set_symbol(dd, LV_SYMBOL_RIGHT);
|
||||
lv_obj_align(dd, LV_ALIGN_LEFT_MID, 10, 0);
|
||||
|
||||
dd = lv_dropdown_create(lv_scr_act());
|
||||
dd = lv_dropdown_create(lv_screen_active());
|
||||
lv_dropdown_set_options_static(dd, opts);
|
||||
lv_dropdown_set_dir(dd, LV_DIR_LEFT);
|
||||
lv_dropdown_set_symbol(dd, LV_SYMBOL_LEFT);
|
||||
|
||||
@@ -10,22 +10,22 @@ opts = "\n".join([
|
||||
"Grape",
|
||||
"Raspberry"])
|
||||
|
||||
dd = lv.dropdown(lv.scr_act())
|
||||
dd = lv.dropdown(lv.screen_active())
|
||||
dd.set_options_static(opts)
|
||||
dd.align(lv.ALIGN.TOP_MID, 0, 10)
|
||||
dd = lv.dropdown(lv.scr_act())
|
||||
dd = lv.dropdown(lv.screen_active())
|
||||
dd.set_options_static(opts)
|
||||
dd.set_dir(lv.DIR.BOTTOM)
|
||||
dd.set_symbol(lv.SYMBOL.UP)
|
||||
dd.align(lv.ALIGN.BOTTOM_MID, 0, -10)
|
||||
|
||||
dd = lv.dropdown(lv.scr_act())
|
||||
dd = lv.dropdown(lv.screen_active())
|
||||
dd.set_options_static(opts)
|
||||
dd.set_dir(lv.DIR.RIGHT)
|
||||
dd.set_symbol(lv.SYMBOL.RIGHT)
|
||||
dd.align(lv.ALIGN.LEFT_MID, 10, 0)
|
||||
|
||||
dd = lv.dropdown(lv.scr_act())
|
||||
dd = lv.dropdown(lv.screen_active())
|
||||
dd.set_options_static(opts)
|
||||
dd.set_dir(lv.DIR.LEFT)
|
||||
dd.set_symbol(lv.SYMBOL.LEFT)
|
||||
|
||||
@@ -15,7 +15,7 @@ static void event_cb(lv_event_t * e)
|
||||
void lv_example_dropdown_3(void)
|
||||
{
|
||||
/*Create a drop down list*/
|
||||
lv_obj_t * dropdown = lv_dropdown_create(lv_scr_act());
|
||||
lv_obj_t * dropdown = lv_dropdown_create(lv_screen_active());
|
||||
lv_obj_align(dropdown, LV_ALIGN_TOP_LEFT, 10, 10);
|
||||
lv_dropdown_set_options(dropdown, "New project\n"
|
||||
"New file\n"
|
||||
|
||||
@@ -21,7 +21,7 @@ def event_cb(e):
|
||||
#
|
||||
|
||||
# Create a drop down list
|
||||
dropdown = lv.dropdown(lv.scr_act())
|
||||
dropdown = lv.dropdown(lv.screen_active())
|
||||
dropdown.align(lv.ALIGN.TOP_LEFT, 10, 10)
|
||||
dropdown.set_options("\n".join([
|
||||
"New project",
|
||||
|
||||
Reference in New Issue
Block a user