api(align) save align in style and handle x/y according to it
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user