}
else if (nexpand_children > 0)
{
- height = allocation->height - widget->requisition.height;
+ height = (gint)allocation->height - (gint)widget->requisition.height;
extra = height / nexpand_children;
}
else
y = allocation->y + GTK_CONTAINER (box)->border_width;
child_allocation.x = allocation->x + GTK_CONTAINER (box)->border_width;
- child_allocation.width = allocation->width - GTK_CONTAINER (box)->border_width * 2;
+ child_allocation.width = MAX (0, allocation->width - GTK_CONTAINER (box)->border_width * 2);
children = box->children;
while (children)
if (child->fill)
{
- child_allocation.height = child_height - child->padding * 2;
+ child_allocation.height = MAX (0, child_height - child->padding * 2);
child_allocation.y = y + child->padding;
}
else
if (child->fill)
{
- child_allocation.height = child_height - child->padding * 2;
+ child_allocation.height = MAX (0, child_height - child->padding * 2);
child_allocation.y = y + child->padding - child_height;
}
else