Bug 561539 - Fix warnings when size allocations fall short of border width

* gtk/gtkalignment.c: Bug 561539 - Fix warnings when size allocations
	fall short of border width and padding.


svn path=/trunk/; revision=21805
This commit is contained in:
Tristan Van Berkom 2008-11-24 19:20:16 +00:00
parent 08b8150598
commit 13d18fe980
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-11-24 Tristan Van Berkom <tvb@gnome.org>
* gtk/gtkalignment.c: Bug 561539 - Fix warnings when size allocations
fall short of border width and padding.
2008-11-22 Paul Bolle <pebolle@tiscali.nl>
Bug 561335 - Fix typos in GtkToolItem documentation

View File

@ -466,8 +466,8 @@ gtk_alignment_size_allocate (GtkWidget *widget,
padding_horizontal = priv->padding_left + priv->padding_right;
padding_vertical = priv->padding_top + priv->padding_bottom;
width = allocation->width - padding_horizontal - 2 * border_width;
height = allocation->height - padding_vertical - 2 * border_width;
width = MAX (1, allocation->width - padding_horizontal - 2 * border_width);
height = MAX (1, allocation->height - padding_vertical - 2 * border_width);
if (width > child_requisition.width)
child_allocation.width = (child_requisition.width *