From e10afbe35597c4c2fc6cc16afabc81409613180d Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 12 Jul 2000 04:34:19 +0000 Subject: Tried rearranging the casts to try for a more correct computation. 2000-07-12 Christopher James Lahey * e-scroll-frame.c: Tried rearranging the casts to try for a more correct computation. svn path=/trunk/; revision=4107 --- widgets/misc/ChangeLog | 5 +++++ widgets/misc/e-scroll-frame.c | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'widgets') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index cb2fd56fe9..4ea43cd55d 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,8 @@ +2000-07-12 Christopher James Lahey + + * e-scroll-frame.c: Tried rearranging the casts to try for a more + correct computation. + 2000-07-08 Dan Winship * e-scroll-frame.c (e_scroll_frame_add): comment out true but diff --git a/widgets/misc/e-scroll-frame.c b/widgets/misc/e-scroll-frame.c index 09443bc0e2..8105b9dee8 100644 --- a/widgets/misc/e-scroll-frame.c +++ b/widgets/misc/e-scroll-frame.c @@ -613,8 +613,8 @@ compute_relative_allocation (GtkWidget *widget, GtkAllocation *allocation) allocation->x = GTK_CONTAINER (widget)->border_width; allocation->y = GTK_CONTAINER (widget)->border_width; - allocation->width = MAX (1, (gint) widget->allocation.width - allocation->x * 2); - allocation->height = MAX (1, (gint) widget->allocation.height - allocation->y * 2); + allocation->width = MAX (1, ((gint)widget->allocation.width) - (gint) allocation->x * 2); + allocation->height = MAX (1, ((gint)widget->allocation.height) - (gint) allocation->y * 2); if (priv->vsb_visible) { GtkRequisition vsb_requisition; @@ -625,8 +625,8 @@ compute_relative_allocation (GtkWidget *widget, GtkAllocation *allocation) || priv->frame_placement == GTK_CORNER_BOTTOM_RIGHT) allocation->x += vsb_requisition.width + priv->sb_spacing; - allocation->width = MAX (1, ((gint) allocation->width - - ((gint) vsb_requisition.width + priv->sb_spacing))); + allocation->width = MAX (1, ((gint) allocation->width) + - (gint) (vsb_requisition.width + priv->sb_spacing)); } if (priv->hsb_visible) { @@ -638,8 +638,8 @@ compute_relative_allocation (GtkWidget *widget, GtkAllocation *allocation) || priv->frame_placement == GTK_CORNER_BOTTOM_RIGHT) allocation->y += hsb_requisition.height + priv->sb_spacing; - allocation->height = MAX (1, ((gint) allocation->height - - ((gint) hsb_requisition.height + priv->sb_spacing))); + allocation->height = MAX (1, ((gint) allocation->height) + - (gint) (hsb_requisition.height + priv->sb_spacing)); } } -- cgit v1.2.3