summaryrefslogtreecommitdiff
path: root/gtk/gtkvpaned.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>2000-03-14 19:57:25 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-03-14 19:57:25 +0000
commit10ba4fd066042b4335ae45e7560565872f71ba9b (patch)
tree17f68ffb0d402b6e66bb891d4a7d9a02a9b6108b /gtk/gtkvpaned.c
parent3f98a849c70ae570b78095cef0152a33ec07c64e (diff)
downloadgdk-pixbuf-10ba4fd066042b4335ae45e7560565872f71ba9b.tar.gz
Merges from gtk-1-2
Diffstat (limited to 'gtk/gtkvpaned.c')
-rw-r--r--gtk/gtkvpaned.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gtk/gtkvpaned.c b/gtk/gtkvpaned.c
index 6a7e113e1..816c17391 100644
--- a/gtk/gtkvpaned.c
+++ b/gtk/gtkvpaned.c
@@ -149,16 +149,16 @@ gtk_vpaned_size_allocate (GtkWidget *widget,
GtkRequisition child2_requisition;
GtkAllocation child1_allocation;
GtkAllocation child2_allocation;
- guint16 border_width;
+ gint border_width;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_VPANED (widget));
g_return_if_fail (allocation != NULL);
-
+
widget->allocation = *allocation;
-
paned = GTK_PANED (widget);
border_width = GTK_CONTAINER (widget)->border_width;
+ gutter_size = paned->gutter_size;
if (paned->child1)
gtk_widget_get_child_requisition (paned->child1, &child1_requisition);
@@ -169,19 +169,19 @@ gtk_vpaned_size_allocate (GtkWidget *widget,
gtk_widget_get_child_requisition (paned->child2, &child2_requisition);
else
child2_requisition.height = 0;
-
- gtk_paned_compute_position(paned,
- widget->allocation.height
- - paned->handle_size
- - 2 * border_width,
- child1_requisition.height,
- child2_requisition.height);
+
+ gtk_paned_compute_position (paned,
+ MAX (1, (gint) widget->allocation.height
+ - (gint) paned->handle_size
+ - 2 * border_width),
+ child1_requisition.height,
+ child2_requisition.height);
/* Move the handle before the children so we don't get extra expose events */
paned->handle_xpos = border_width;
paned->handle_ypos = paned->child1_size + border_width;
- paned->handle_width = widget->allocation.width - 2 * border_width;
+ paned->handle_width = MAX (1, (gint) widget->allocation.width - 2 * border_width);
paned->handle_height = paned->handle_size;
if (GTK_WIDGET_REALIZED(widget))
@@ -198,7 +198,7 @@ gtk_vpaned_size_allocate (GtkWidget *widget,
paned->handle_size);
}
- child1_allocation.width = child2_allocation.width = MAX(1, (gint) allocation->width - border_width * 2);
+ 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 = border_width;
child1_allocation.y = border_width;