diff --git a/examples/layouts/grid/lv_example_grid_1.c b/examples/layouts/grid/lv_example_grid_1.c index f3e5c3df6..cb161880c 100644 --- a/examples/layouts/grid/lv_example_grid_1.c +++ b/examples/layouts/grid/lv_example_grid_1.c @@ -6,8 +6,8 @@ */ void lv_example_grid_1(void) { - static lv_coord_t col_dsc[] = {70, 70, 70, LV_COORD_MAX}; - static lv_coord_t row_dsc[] = {50, 50, 50, LV_COORD_MAX}; + static lv_coord_t col_dsc[] = {70, 70, 70, LV_GRID_TEMPLATE_LAST}; + static lv_coord_t row_dsc[] = {50, 50, 50, LV_GRID_TEMPLATE_LAST}; /*Create a container with grid*/ lv_obj_t * cont = lv_obj_create(lv_scr_act()); diff --git a/src/extra/layouts/grid/lv_grid.c b/src/extra/layouts/grid/lv_grid.c index 3cd7c689f..6564ffc1d 100644 --- a/src/extra/layouts/grid/lv_grid.c +++ b/src/extra/layouts/grid/lv_grid.c @@ -734,7 +734,7 @@ static lv_coord_t grid_align(lv_coord_t cont_size, bool auto_size, uint8_t alig static uint32_t count_tracks(const lv_coord_t * templ) { uint32_t i; - for(i = 0; templ[i] != LV_COORD_MAX; i++); + for(i = 0; templ[i] != LV_GRID_TEMPLATE_LAST; i++); return i; } diff --git a/src/extra/layouts/grid/lv_grid.h b/src/extra/layouts/grid/lv_grid.h index f2966d0d9..0403eb5e5 100644 --- a/src/extra/layouts/grid/lv_grid.h +++ b/src/extra/layouts/grid/lv_grid.h @@ -78,10 +78,10 @@ void lv_obj_set_grid_align(lv_obj_t * obj, lv_grid_align_t column_align, lv_grid /** * Set the cell of an object. The object's parent needs to have grid layout, else nothing will happen * @param obj pointer to an object - * @param hor_place the vertical alignment in the cell. `LV_GRID_START/END/CENTER/STRETCH` + * @param column_align the vertical alignment in the cell. `LV_GRID_START/END/CENTER/STRETCH` * @param col_pos column ID * @param col_span number of columns to take (>= 1) - * @param ver_place the horizontal alignment in the cell. `LV_GRID_START/END/CENTER/STRETCH` + * @param row_align the horizontal alignment in the cell. `LV_GRID_START/END/CENTER/STRETCH` * @param row_pos row ID * @param row_span number of rows to take (>= 1) */