Quick fix for size allocation -- needs more work overall

This commit is contained in:
Jay Painter 1998-03-24 08:52:41 +00:00
parent 102b1de4b4
commit 36e83663cf

View File

@ -416,12 +416,22 @@ gtk_handle_box_size_allocate (GtkWidget *widget,
hb = GTK_HANDLE_BOX (widget); hb = GTK_HANDLE_BOX (widget);
widget->allocation.x = allocation->x; widget->allocation.x = allocation->x;
if (hb->child_detached)
{
if (allocation->height > widget->requisition.height) if (allocation->height > widget->requisition.height)
widget->allocation.y = allocation->y + (allocation->height - widget->requisition.height) / 2; widget->allocation.y = allocation->y +
(allocation->height - widget->requisition.height) / 2;
else else
widget->allocation.y = allocation->y; widget->allocation.y = allocation->y;
widget->allocation.height = MIN (allocation->height, widget->requisition.height); widget->allocation.height = MIN (allocation->height, widget->requisition.height);
widget->allocation.width = MIN (allocation->width, widget->requisition.width); widget->allocation.width = MIN (allocation->width, widget->requisition.width);
}
else
{
widget->allocation = *allocation;
}
if (GTK_WIDGET_REALIZED (hb)) if (GTK_WIDGET_REALIZED (hb))
gdk_window_move_resize (widget->window, gdk_window_move_resize (widget->window,