[evolution/foocanvas] Fixup e_canvas_background: Don't initialise the clipping box to -1.



commit 44dae094c09dc6084ac40c0396c2f72ebb035ac2
Author: H.Habighorst <h habighorst googlemail com>
Date:   Tue May 11 18:06:39 2010 +0200

    Fixup e_canvas_background: Don't initialise the clipping box to -1.

 widgets/misc/e-canvas-background.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index 2b69c20..ad908a8 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -326,10 +326,10 @@ ecb_init (ECanvasBackground *ecb)
 	ecb->priv->color.blue   = 0;
 	ecb->priv->stipple      = NULL;
 	ecb->priv->gc           = NULL;
-	ecb->priv->x1           = -1.0;
-	ecb->priv->x2           = -1.0;
-	ecb->priv->y1           = -1.0;
-	ecb->priv->y2           = -1.0;
+	ecb->priv->x1           = 0.0;
+	ecb->priv->x2           = 0.0;
+	ecb->priv->y1           = 0.0;
+	ecb->priv->y2           = 0.0;
 }
 
 static void
@@ -382,13 +382,13 @@ ecb_draw (FooCanvasItem *item,
 	 * Find out our real position after grouping
 	 */
 
-	if (ecb->priv->x1 >= 0 && ecb->priv->x1 > x)
+	if (ecb->priv->x1 > 0 && ecb->priv->x1 > x)
 		x = ecb->priv->x1;
-	if (ecb->priv->y1 >= 0 && ecb->priv->y1 > y)
+	if (ecb->priv->y1 > 0 && ecb->priv->y1 > y)
 		y = ecb->priv->y1;
-	if (ecb->priv->x2 >= 0 && ecb->priv->x2 < width)
+	if (ecb->priv->x2 > 0 && ecb->priv->x2 < width)
 		width = ecb->priv->x2;
-	if (ecb->priv->y2 >= 0 && ecb->priv->y2 < height)
+	if (ecb->priv->y2 > 0 && ecb->priv->y2 < height)
 		height = ecb->priv->y2;
 
 	gdk_draw_rectangle (drawable, ecb->priv->gc, TRUE,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]