GtkListBox: Consider width of filtered rows

Without this lists keep shrinking in width as they are filtered, whic
looks really bad.
This commit is contained in:
Alexander Larsson 2013-06-13 10:47:52 +02:00
parent 220eb45ef0
commit 61f44628d6

View File

@ -1867,7 +1867,10 @@ gtk_list_box_real_get_preferred_width (GtkWidget* widget, gint* minimum_width_ou
iter = g_sequence_iter_next (iter)) iter = g_sequence_iter_next (iter))
{ {
row = g_sequence_get (iter); row = g_sequence_get (iter);
if (!row_is_visible (row))
/* We *do* take visible but filtered rows into account here so that the list
width doesn't change during filtering */
if (!gtk_widget_get_visible (GTK_WIDGET (row)))
continue; continue;
gtk_widget_get_preferred_width (GTK_WIDGET (row), &row_min, &row_nat); gtk_widget_get_preferred_width (GTK_WIDGET (row), &row_min, &row_nat);