diff --git a/ChangeLog b/ChangeLog index f6de2029c2..17fdba023c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-24 Tristan Van Berkom + + * gtk/gtkalignment.c: Bug 561539 - Fix warnings when size allocations + fall short of border width and padding. + 2008-11-22 Paul Bolle Bug 561335 - Fix typos in GtkToolItem documentation diff --git a/gtk/gtkalignment.c b/gtk/gtkalignment.c index 9daa14a755..bf3523b179 100644 --- a/gtk/gtkalignment.c +++ b/gtk/gtkalignment.c @@ -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 *