diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/ChangeLog | 5 | ||||
-rw-r--r-- | widgets/misc/e-scroll-frame.c | 12 |
2 files changed, 11 insertions, 6 deletions
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 <clahey@helixcode.com> + + * e-scroll-frame.c: Tried rearranging the casts to try for a more + correct computation. + 2000-07-08 Dan Winship <danw@helixcode.com> * 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)); } } |