summaryrefslogtreecommitdiff
path: root/gtk/gtkhbox.c
diff options
context:
space:
mode:
authorOwen Taylor <owt1@cornell.edu>1998-04-03 23:17:16 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-04-03 23:17:16 +0000
commit32cd050cfe286e636d4df6d96a4b46936279a5a6 (patch)
tree4f45bb5081e616ff501d984ea7c3481e0d43ab74 /gtk/gtkhbox.c
parent740b70ea0c1bcdb5943b85ed0bba434f73f9a292 (diff)
downloadgdk-pixbuf-32cd050cfe286e636d4df6d96a4b46936279a5a6.tar.gz
More extensive debugging output
Fri Apr 3 17:14:55 1998 Owen Taylor <owt1@cornell.edu> * gdk/gdk.c: More extensive debugging output * gtk/gtkalignment.c gtk/gtkbutton.c gtk/gtkcheckbutton.c gtk/gtkclist.c gtk/gtkeventbox.c gtk/gtkhandlebox.c gtk/gtk[hv]box.c gtk/gtk[hv]paned.c gtk/gtklist.c gtk/gtkmenu.c gtk/gtkmenubar.c gtk/gtkmenuitem.c gtk/gtknotebook.c gtk/gtktable.c gtk/gtktree.c gtk/gtktreeitem.c gtk/gtkviewport.c Avoid assigning negative values to unsigned allocation.width and height * gtk/gtkwindow.c: Instead of realizing the widget, then size allocating, (resulting in XMoveResizeWindows for all children, do the size allocation first, then realize. In gtk_real_window_move_resize, combine move and resize into a single GDK/X call when possible. * gtk/gtkclist.c gtk/gtkdrawingarea.c: Remove assumption that the widget will be size allocated _after_ it is realized. * gtk/gtklist.c (gtk_list_motion_notify): Removed useless debugging message.
Diffstat (limited to 'gtk/gtkhbox.c')
-rw-r--r--gtk/gtkhbox.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkhbox.c b/gtk/gtkhbox.c
index f8f8848ac..eb46104d6 100644
--- a/gtk/gtkhbox.c
+++ b/gtk/gtkhbox.c
@@ -187,7 +187,7 @@ gtk_hbox_size_allocate (GtkWidget *widget,
}
else if (nexpand_children > 0)
{
- width = allocation->width - widget->requisition.width;
+ width = (gint)allocation->width - (gint)widget->requisition.width;
extra = width / nexpand_children;
}
else
@@ -198,7 +198,7 @@ gtk_hbox_size_allocate (GtkWidget *widget,
x = allocation->x + GTK_CONTAINER (box)->border_width;
child_allocation.y = allocation->y + GTK_CONTAINER (box)->border_width;
- child_allocation.height = allocation->height - GTK_CONTAINER (box)->border_width * 2;
+ child_allocation.height = MAX (0, allocation->height - GTK_CONTAINER (box)->border_width * 2);
children = box->children;
while (children)
@@ -236,7 +236,7 @@ gtk_hbox_size_allocate (GtkWidget *widget,
if (child->fill)
{
- child_allocation.width = child_width - child->padding * 2;
+ child_allocation.width = MAX (0, child_width - child->padding * 2);
child_allocation.x = x + child->padding;
}
else
@@ -289,7 +289,7 @@ gtk_hbox_size_allocate (GtkWidget *widget,
if (child->fill)
{
- child_allocation.width = child_width - child->padding * 2;
+ child_allocation.width = MAX (0, child_width - child->padding * 2);
child_allocation.x = x + child->padding - child_width;
}
else