From 61ec555e80b3e208c09a81bb2f2df530d947d360 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 30 Aug 2000 21:54:48 +0000 Subject: Ensure that the child's allocation height is >= 1. 2000-08-30 Federico Mena Quintero * widgets/e-paned/e-vpaned.c (e_vpaned_size_allocate): Ensure that the child's allocation height is >= 1. * widgets/e-paned/e-hpaned.c (e_hpaned_size_allocate): Ensure that the child's allocation width is >= 1. 2000-08-30 Federico Mena Quintero * ChangeLog: Started a ChangeLog here. svn path=/trunk/; revision=5123 --- widgets/ChangeLog | 11 +++++++++++ widgets/e-paned/e-hpaned.c | 11 +++++++---- widgets/e-paned/e-vpaned.c | 11 +++++++---- 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 widgets/ChangeLog (limited to 'widgets') diff --git a/widgets/ChangeLog b/widgets/ChangeLog new file mode 100644 index 0000000000..8aa996141b --- /dev/null +++ b/widgets/ChangeLog @@ -0,0 +1,11 @@ +2000-08-30 Federico Mena Quintero + + * widgets/e-paned/e-vpaned.c (e_vpaned_size_allocate): Ensure that + the child's allocation height is >= 1. + + * widgets/e-paned/e-hpaned.c (e_hpaned_size_allocate): Ensure that + the child's allocation width is >= 1. + +2000-08-30 Federico Mena Quintero + + * ChangeLog: Started a ChangeLog here. diff --git a/widgets/e-paned/e-hpaned.c b/widgets/e-paned/e-hpaned.c index 933fc1c057..5f2e451447 100644 --- a/widgets/e-paned/e-hpaned.c +++ b/widgets/e-paned/e-hpaned.c @@ -225,15 +225,18 @@ e_hpaned_size_allocate (GtkWidget *widget, gdk_window_hide(paned->handle); } - child1_allocation.height = child2_allocation.height = MAX (1, (gint) allocation->height - border_width * 2); - child1_allocation.width = paned->child1_real_size; + child1_allocation.height = child2_allocation.height = MAX (1, ((int) allocation->height - + border_width * 2)); + child1_allocation.width = MAX (1, paned->child1_real_size); child1_allocation.x = border_width; child1_allocation.y = child2_allocation.y = border_width; if (handle_shown) - child2_allocation.x = child1_allocation.x + child1_allocation.width + paned->handle_width; + child2_allocation.x = (child1_allocation.x + (int) child1_allocation.width + + (int) paned->handle_width); else - child2_allocation.x = child1_allocation.x + child1_allocation.width; + child2_allocation.x = child1_allocation.x + (int) child1_allocation.width; + child2_allocation.width = MAX (1, (gint) allocation->width - child2_allocation.x - border_width); /* Now allocate the childen, making sure, when resizing not to diff --git a/widgets/e-paned/e-vpaned.c b/widgets/e-paned/e-vpaned.c index 705a36f331..c13ed2f549 100644 --- a/widgets/e-paned/e-vpaned.c +++ b/widgets/e-paned/e-vpaned.c @@ -224,15 +224,18 @@ e_vpaned_size_allocate (GtkWidget *widget, gdk_window_hide(paned->handle); } - child1_allocation.width = child2_allocation.width = MAX (1, (gint) allocation->width - border_width * 2); - child1_allocation.height = paned->child1_real_size; + child1_allocation.width = child2_allocation.width = MAX (1, ((int) allocation->width - + border_width * 2)); + child1_allocation.height = MAX (1, (int) paned->child1_real_size); child1_allocation.x = child2_allocation.x = border_width; child1_allocation.y = border_width; if (handle_shown) - child2_allocation.y = child1_allocation.y + child1_allocation.height + paned->handle_height; + child2_allocation.y = (child1_allocation.y + (int) child1_allocation.height + + (int) paned->handle_height); else - child2_allocation.y = child1_allocation.y + child1_allocation.height; + child2_allocation.y = child1_allocation.y + (int) child1_allocation.height; + child2_allocation.height = MAX(1, (gint) allocation->height - child2_allocation.y - border_width); /* Now allocate the childen, making sure, when resizing not to -- cgit v1.2.3