]> Pileus Git - ~andy/gtk/commitdiff
arrow: x and y coordinates of the arrow rendering should be double
authorCosimo Cecchi <cosimoc@gnome.org>
Sun, 27 Feb 2011 00:29:44 +0000 (19:29 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Thu, 3 Mar 2011 22:48:25 +0000 (17:48 -0500)
To prevent off-by-one rounding errors when drawing them later.

gtk/gtkarrow.c

index c0c4ccfa7732601b0e5ae77f1da9dc1118517e90..9d46d69bf9bf05b0c8204792254c9a04c3b49403 100644 (file)
@@ -312,7 +312,8 @@ gtk_arrow_draw (GtkWidget *widget,
   GtkMisc *misc = GTK_MISC (widget);
   GtkStyleContext *context;
   GtkStateFlags state;
-  gint x, y, width, height;
+  gdouble x, y;
+  gint width, height;
   gint extent;
   gint xpad, ypad;
   gfloat xalign, yalign;
@@ -344,8 +345,8 @@ gtk_arrow_draw (GtkWidget *widget,
         effective_arrow_type = GTK_ARROW_LEFT;
     }
 
-  x = floor (xpad + ((width  - extent) * xalign));
-  y = floor (ypad + ((height - extent) * yalign));
+  x = xpad + ((width  - extent) * xalign);
+  y = ypad + ((height - extent) * yalign);
 
   switch (effective_arrow_type)
     {