diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-06-13 10:47:52 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-06-13 10:47:52 +0200 |
commit | f6c1968214b384c3ba60e02f1d0514364a42921e (patch) | |
tree | 1223dcc16c8a1bac805bda46ab5ca9f754bb8c51 | |
parent | 697e4066b0580a504d6eb4d371b41583bd336e7b (diff) | |
download | gtk+-wip/listbox.tar.gz |
GtkListBox: Consider width of filtered rowswip/listbox
Without this lists keep shrinking in width as they are filtered, whic
looks really bad.
-rw-r--r-- | gtk/gtklistbox.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c index bd9a852b94..cccc04fd44 100644 --- a/gtk/gtklistbox.c +++ b/gtk/gtklistbox.c @@ -1867,7 +1867,10 @@ gtk_list_box_real_get_preferred_width (GtkWidget* widget, gint* minimum_width_ou iter = g_sequence_iter_next (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; gtk_widget_get_preferred_width (GTK_WIDGET (row), &row_min, &row_nat); |