mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 09:00:34 +00:00
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:
parent
220eb45ef0
commit
61f44628d6
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user