diff options
author | Jay Painter <jpaint@src.gnome.org> | 1998-03-24 08:52:41 +0000 |
---|---|---|
committer | Jay Painter <jpaint@src.gnome.org> | 1998-03-24 08:52:41 +0000 |
commit | 36e83663cf3ee151953267cc0bc163ec3d3f4af6 (patch) | |
tree | ed79c48647f2d8b0483f17329458fd9d5499b963 /gtk/gtkhandlebox.c | |
parent | 102b1de4b4e7939e9fe513ee929bc073eaa11741 (diff) | |
download | gtk+-36e83663cf3ee151953267cc0bc163ec3d3f4af6.tar.gz |
Quick fix for size allocation -- needs more work overall
Diffstat (limited to 'gtk/gtkhandlebox.c')
-rw-r--r-- | gtk/gtkhandlebox.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c index 04954b0ad0..2f3ce9b671 100644 --- a/gtk/gtkhandlebox.c +++ b/gtk/gtkhandlebox.c @@ -416,13 +416,23 @@ gtk_handle_box_size_allocate (GtkWidget *widget, hb = GTK_HANDLE_BOX (widget); widget->allocation.x = allocation->x; - if (allocation->height > widget->requisition.height) - widget->allocation.y = allocation->y + (allocation->height - widget->requisition.height) / 2; + + if (hb->child_detached) + { + if (allocation->height > widget->requisition.height) + widget->allocation.y = allocation->y + + (allocation->height - widget->requisition.height) / 2; + else + widget->allocation.y = allocation->y; + + widget->allocation.height = MIN (allocation->height, widget->requisition.height); + widget->allocation.width = MIN (allocation->width, widget->requisition.width); + } else - widget->allocation.y = allocation->y; - widget->allocation.height = MIN (allocation->height, widget->requisition.height); - widget->allocation.width = MIN (allocation->width, widget->requisition.width); - + { + widget->allocation = *allocation; + } + if (GTK_WIDGET_REALIZED (hb)) gdk_window_move_resize (widget->window, widget->allocation.x, |