api(align) save align in style and handle x/y according to it

This commit is contained in:
Gabor Kiss-Vamosi
2021-03-25 16:14:17 +01:00
parent 53f3cc1827
commit a2f3022188
92 changed files with 271 additions and 197 deletions

View File

@@ -13,19 +13,8 @@ void lv_example_list_1(void)
/*Create a list*/
list1 = lv_list_create(lv_scr_act());
lv_obj_set_size(list1, 180, 220);
lv_obj_align(list1, NULL, LV_ALIGN_CENTER, 0, 0);
lv_obj_center(list1);
uint32_t t = lv_tick_get();
int i;
for(i = 0; i < 3; i++) {
// lv_btn_create(lv_scr_act());
lv_list_add_btn(list1, LV_SYMBOL_FILE, "New", event_handler);
}
printf("%d\n", t);
return;
/*Add buttons to the list*/
lv_list_add_text(list1, "File");
lv_list_add_btn(list1, LV_SYMBOL_FILE, "New", event_handler);