diff options
author | Tim Janik <timj@gtk.org> | 2001-11-20 13:55:08 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 2001-11-20 13:55:08 +0000 |
commit | 2394977634817390b27a13de8577f865f3ef7e6f (patch) | |
tree | de823fd230adf3f7799fa186ad30afc41e4df7dc /gtk/gtkvpaned.c | |
parent | 5b9a4753c9dfec4b430ac0c3af4653bc7604867f (diff) | |
download | gdk-pixbuf-2394977634817390b27a13de8577f865f3ef7e6f.tar.gz |
fix allocation to be relative to paned->allocation, now that this is a
Tue Nov 20 14:49:59 2001 Tim Janik <timj@gtk.org>
* gtk/gtkvpaned.c (gtk_vpaned_size_allocate): fix
allocation to be relative to paned->allocation, now
that this is a NO_WINDOW widget.
* gtk/gtkhpaned.c (gtk_hpaned_size_allocate): same here.
* gtk/gtkaccellabel.c (gtk_accel_label_class_init): ::closure
needs to be a boxed property.
Diffstat (limited to 'gtk/gtkvpaned.c')
-rw-r--r-- | gtk/gtkvpaned.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gtk/gtkvpaned.c b/gtk/gtkvpaned.c index ffbf88317..3951f76b3 100644 --- a/gtk/gtkvpaned.c +++ b/gtk/gtkvpaned.c @@ -193,23 +193,24 @@ gtk_vpaned_size_allocate (GtkWidget *widget, child1_allocation.width = child2_allocation.width = MAX (1, (gint) allocation->width - border_width * 2); child1_allocation.height = paned->child1_size; child1_allocation.x = child2_allocation.x = widget->allocation.x + border_width; - child1_allocation.y = border_width; + child1_allocation.y = widget->allocation.y + border_width; child2_allocation.y = child1_allocation.y + child1_allocation.height + paned->handle_pos.height; - child2_allocation.height = MAX(1, (gint) allocation->height - child2_allocation.y - border_width); + child2_allocation.height = MAX (1, (gint) allocation->height - child2_allocation.y - border_width); /* Now allocate the childen, making sure, when resizing not to - * overlap the windows */ + * overlap the windows + */ if (GTK_WIDGET_MAPPED (widget) && paned->child1->allocation.height < child1_allocation.height) { - gtk_widget_size_allocate(paned->child2, &child2_allocation); - gtk_widget_size_allocate(paned->child1, &child1_allocation); + gtk_widget_size_allocate (paned->child2, &child2_allocation); + gtk_widget_size_allocate (paned->child1, &child1_allocation); } else { - gtk_widget_size_allocate(paned->child1, &child1_allocation); - gtk_widget_size_allocate(paned->child2, &child2_allocation); + gtk_widget_size_allocate (paned->child1, &child1_allocation); + gtk_widget_size_allocate (paned->child2, &child2_allocation); } } else @@ -219,8 +220,8 @@ gtk_vpaned_size_allocate (GtkWidget *widget, if (GTK_WIDGET_REALIZED (widget)) gdk_window_hide (paned->handle); - child_allocation.x = border_width; - child_allocation.y = border_width; + child_allocation.x = widget->allocation.x + border_width; + child_allocation.y = widget->allocation.y + border_width; child_allocation.width = MAX (1, allocation->width - 2 * border_width); child_allocation.height = MAX (1, allocation->height - 2 * border_width); |