From c4119e58cfcc2cd605e90efe4d56c50fbffe1a2c Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Tue, 17 Aug 2010 01:32:44 -0400 Subject: [PATCH] Clipped values for gtk_distribute_natural_allocation() --- gtk/gtktreeviewcolumn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 0021331bf1..02b91c86f0 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -3801,7 +3801,7 @@ gtk_tree_view_column_get_height_for_width (GtkTreeViewColumn *column, /* Distribute as much of remaining 'size' as possible before sharing expand space */ sizes = (GtkRequestedSize *)array->data; - size = gtk_distribute_natural_allocation (size, array->len, sizes); + size = gtk_distribute_natural_allocation (MAX (0, size), array->len, sizes); /* The rest gets split up evenly among expanding cells */ if (expand_cell_count) @@ -3903,7 +3903,7 @@ gtk_tree_view_column_allocate_width (GtkTreeViewColumn *column, /* Distribute as much of remaining 'size' as possible before sharing expand space */ sizes = (GtkRequestedSize *)array->data; - size = gtk_distribute_natural_allocation (size, array->len, sizes); + size = gtk_distribute_natural_allocation (MAX (0, size), array->len, sizes); /* The rest gets split up evenly among expanding cells */ if (expand_cell_count > 0)