[gtk+/treeview-refactor] Fix GtkCellAreaBox allocate_cells_manually to handle undersized areas.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/treeview-refactor] Fix GtkCellAreaBox allocate_cells_manually to handle undersized areas.
- Date: Mon, 6 Dec 2010 07:26:54 +0000 (UTC)
commit 9366a345b47bfb64f1e237392209a71d13114053
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Mon Dec 6 16:29:40 2010 +0900
Fix GtkCellAreaBox allocate_cells_manually to handle undersized areas.
gtk/gtkcellareabox.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcellareabox.c b/gtk/gtkcellareabox.c
index 62db9b5..e977679 100644
--- a/gtk/gtkcellareabox.c
+++ b/gtk/gtkcellareabox.c
@@ -697,7 +697,10 @@ allocate_cells_manually (GtkCellAreaBox *box,
/* Naturally distribute the allocation */
avail_size -= (nvisible - 1) * priv->spacing;
- avail_size = gtk_distribute_natural_allocation (avail_size, nvisible, sizes);
+ if (avail_size > 0)
+ avail_size = gtk_distribute_natural_allocation (avail_size, nvisible, sizes);
+ else
+ avail_size = 0;
/* Calculate/distribute expand for cells */
if (nexpand > 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]