[gtk+/wip/listbox] GtkListBox: Consider width of filtered rows
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/listbox] GtkListBox: Consider width of filtered rows
- Date: Thu, 13 Jun 2013 08:48:35 +0000 (UTC)
commit f6c1968214b384c3ba60e02f1d0514364a42921e
Author: Alexander Larsson <alexl redhat com>
Date: Thu Jun 13 10:47:52 2013 +0200
GtkListBox: Consider width of filtered rows
Without this lists keep shrinking in width as they are filtered, whic
looks really bad.
gtk/gtklistbox.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index bd9a852..cccc04f 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]