feat(style): store layout and position coordinates as style properties
related to #2152
This commit is contained in:
@@ -12,12 +12,8 @@ static void event_handler(lv_obj_t * obj, lv_event_t event)
|
||||
|
||||
void lv_example_checkbox_1(void)
|
||||
{
|
||||
static lv_flex_t flex_center;
|
||||
lv_flex_init(&flex_center);
|
||||
lv_flex_set_flow(&flex_center, LV_FLEX_FLOW_COLUMN);
|
||||
lv_flex_set_place(&flex_center, LV_FLEX_PLACE_CENTER, LV_FLEX_PLACE_START, LV_FLEX_PLACE_CENTER);
|
||||
|
||||
lv_obj_set_layout(lv_scr_act(), &flex_center);
|
||||
lv_obj_set_flex_flow(lv_scr_act(), LV_FLEX_FLOW_COLUMN);
|
||||
lv_obj_set_flex_place(lv_scr_act(), LV_FLEX_PLACE_CENTER, LV_FLEX_PLACE_START, LV_FLEX_PLACE_CENTER);
|
||||
|
||||
lv_obj_t * cb;
|
||||
cb = lv_checkbox_create(lv_scr_act(), NULL);
|
||||
|
||||
Reference in New Issue
Block a user