api(style) remove content style proeprties
This commit is contained in:
@@ -17,7 +17,7 @@ void lv_example_grid_3(void)
|
||||
static lv_coord_t row_dsc[] = {40, LV_GRID_FR(1), 40, LV_GRID_TEMPLATE_LAST};
|
||||
|
||||
/*Create a container with grid*/
|
||||
lv_obj_t * cont = lv_obj_create(lv_scr_act(), NULL);
|
||||
lv_obj_t * cont = lv_obj_create(lv_scr_act());
|
||||
lv_obj_set_size(cont, 300, 220);
|
||||
lv_obj_align(cont, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_grid_template(cont, col_dsc, row_dsc);
|
||||
@@ -29,13 +29,13 @@ void lv_example_grid_3(void)
|
||||
uint8_t col = i % 3;
|
||||
uint8_t row = i / 3;
|
||||
|
||||
obj = lv_obj_create(cont, NULL);
|
||||
obj = lv_obj_create(cont);
|
||||
/*Stretch the cell horizontally and vertically too
|
||||
*Set span to 1 to make the cell 1 column/row sized*/
|
||||
lv_obj_set_grid_cell(obj, LV_GRID_STRETCH, col, 1,
|
||||
LV_GRID_STRETCH, row, 1);
|
||||
|
||||
label = lv_label_create(obj, NULL);
|
||||
label = lv_label_create(obj);
|
||||
lv_label_set_text_fmt(label, "%d,%d", col, row);
|
||||
lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user