gridview: Fix condition for adding filler tiles
Code above ensures that i is always in [0, n_columns - 1] range, so the condition was always true, which resulted in filler tile always being added to the grid. As the result, an empty row appeared at the end of the grid if the number of columns divided the number of items. Only add filler tile if last row is not full, i.e. when i > 0.
This commit is contained in:
@@ -820,7 +820,7 @@ gtk_grid_view_size_allocate (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
/* Add a filler tile for empty space in the bottom right */
|
||||
if (i < self->n_columns)
|
||||
if (i > 0)
|
||||
{
|
||||
GtkListTile *filler;
|
||||
tile = gtk_list_item_manager_get_last (self->item_manager);
|
||||
|
||||
Reference in New Issue
Block a user