[gtk+/wip/list: 7/8] listview: Reduce the amount of widgets we pre-allocate for sizing



commit fe421e1a7d5c114ce09b6041e79eebe6320f16dc
Author: Benjamin Otte <otte redhat com>
Date:   Fri May 11 04:44:05 2012 +0200

    listview: Reduce the amount of widgets we pre-allocate for sizing
    
    This is getting kinda dangerous because we imply that a child is at
    least 4px high by now.

 gtk/gtklistview.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtklistview.c b/gtk/gtklistview.c
index 9588575..13cfbe4 100644
--- a/gtk/gtklistview.c
+++ b/gtk/gtklistview.c
@@ -325,7 +325,7 @@ gtk_list_view_update_items (GtkListView *list_view)
    * performance and memory increases (that hopefully should be linear).
    */
   n_total_items = gtk_list_view_get_n_items (list_view);
-  n_cached_items = gdk_screen_get_height (gtk_widget_get_screen (GTK_WIDGET (list_view)));
+  n_cached_items = gdk_screen_get_height (gtk_widget_get_screen (GTK_WIDGET (list_view))) / 4;
   n_cached_items = MIN (n_cached_items, n_total_items);
   if (priv->top)
     first = priv->top->pos;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]