mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 23:24:16 +00:00
columviewlayout: Skip children when we should
Every layout manager should call gtk_widget_should_layout on their children before measuring or allocating them. So do it here too.
This commit is contained in:
parent
672413f1f6
commit
0f81b58545
@ -57,6 +57,9 @@ gtk_column_view_layout_measure_along (GtkColumnViewLayout *self,
|
|||||||
int child_min_baseline = -1;
|
int child_min_baseline = -1;
|
||||||
int child_nat_baseline = -1;
|
int child_nat_baseline = -1;
|
||||||
|
|
||||||
|
if (!gtk_widget_should_layout (child))
|
||||||
|
continue;
|
||||||
|
|
||||||
gtk_widget_measure (child, orientation, for_size,
|
gtk_widget_measure (child, orientation, for_size,
|
||||||
&child_min, &child_nat,
|
&child_min, &child_nat,
|
||||||
&child_min_baseline, &child_nat_baseline);
|
&child_min_baseline, &child_nat_baseline);
|
||||||
@ -117,6 +120,9 @@ gtk_column_view_layout_allocate (GtkLayoutManager *layout_manager,
|
|||||||
GtkColumnViewColumn *column;
|
GtkColumnViewColumn *column;
|
||||||
int col_x, col_width;
|
int col_x, col_width;
|
||||||
|
|
||||||
|
if (!gtk_widget_should_layout (child))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (GTK_IS_COLUMN_VIEW_CELL (child))
|
if (GTK_IS_COLUMN_VIEW_CELL (child))
|
||||||
{
|
{
|
||||||
column = gtk_column_view_cell_get_column (GTK_COLUMN_VIEW_CELL (child));
|
column = gtk_column_view_cell_get_column (GTK_COLUMN_VIEW_CELL (child));
|
||||||
|
Loading…
Reference in New Issue
Block a user