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

@@ -6,7 +6,7 @@ void lv_example_obj_1(void)
lv_obj_t * obj1;
obj1 = lv_obj_create(lv_scr_act());
lv_obj_set_size(obj1, 100, 50);
lv_obj_align(obj1, NULL, LV_ALIGN_CENTER, -60, -30);
lv_obj_align(obj1, LV_ALIGN_CENTER, -60, -30);
static lv_style_t style_shadow;
lv_style_init(&style_shadow);
@@ -17,6 +17,6 @@ void lv_example_obj_1(void)
lv_obj_t * obj3;
obj3 = lv_obj_create(lv_scr_act());
lv_obj_add_style(obj3, LV_PART_MAIN, LV_STATE_DEFAULT, &style_shadow);
lv_obj_align(obj3, NULL, LV_ALIGN_CENTER, 60, 30);
lv_obj_align(obj3, LV_ALIGN_CENTER, 60, 30);
}
#endif