mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
columnview: check column visibility when measuring
We only want to measure visible columns so that they may consume the maximum width available to the widget. This fixes a situation where hidden columns would cause less-than the whole width to be allocated. Additionally that fixes warnings where some widgets expect more horizontal space than they would ultimately be allocated.
This commit is contained in:
parent
2ae345aa8f
commit
8548a1dd7f
@ -1845,9 +1845,13 @@ gtk_column_view_measure_across (GtkColumnView *self,
|
||||
int col_min, col_nat;
|
||||
|
||||
column = g_list_model_get_item (G_LIST_MODEL (self->columns), i);
|
||||
gtk_column_view_column_measure (column, &col_min, &col_nat);
|
||||
min += col_min;
|
||||
nat += col_nat;
|
||||
|
||||
if (gtk_column_view_column_get_visible (column))
|
||||
{
|
||||
gtk_column_view_column_measure (column, &col_min, &col_nat);
|
||||
min += col_min;
|
||||
nat += col_nat;
|
||||
}
|
||||
|
||||
g_object_unref (column);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user