gridview: Always set header and footer size
Update tile allocation for headers and foots in cases where we go from having headers to not having headers. Before this commit, turning sections off in testsections would leave the global header and footer with some empty space allocated.
This commit is contained in:
@@ -929,11 +929,25 @@ gtk_grid_view_size_allocate (GtkWidget *widget,
|
||||
{
|
||||
if (i > 0)
|
||||
i = self->n_columns;
|
||||
|
||||
if (!gtk_list_item_manager_get_has_sections (self->item_manager) && i == 0)
|
||||
gtk_list_tile_set_area_size (self->item_manager,
|
||||
tile,
|
||||
column_end (self, xspacing, self->n_columns - 1)
|
||||
- column_start (self, xspacing, 0),
|
||||
0);
|
||||
}
|
||||
else if (gtk_list_tile_is_header (tile))
|
||||
{
|
||||
g_assert (i == 0);
|
||||
i = self->n_columns;
|
||||
|
||||
if (!gtk_list_item_manager_get_has_sections (self->item_manager))
|
||||
gtk_list_tile_set_area_size (self->item_manager,
|
||||
tile,
|
||||
column_end (self, xspacing, self->n_columns - 1)
|
||||
- column_start (self, xspacing, 0),
|
||||
0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user