diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-02-26 19:29:44 -0500 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-03-03 17:48:25 -0500 |
commit | fa4fb6724c4afbd59535148303bc5ba8265f4d70 (patch) | |
tree | 7d76aaa5db3e0acdb4238dc1829b7e24e8208406 /gtk/gtkarrow.c | |
parent | 230bd4b4617bb2bc803d946658529a0b3e15b44c (diff) | |
download | gtk+-fa4fb6724c4afbd59535148303bc5ba8265f4d70.tar.gz |
arrow: x and y coordinates of the arrow rendering should be double
To prevent off-by-one rounding errors when drawing them later.
Diffstat (limited to 'gtk/gtkarrow.c')
-rw-r--r-- | gtk/gtkarrow.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/gtkarrow.c b/gtk/gtkarrow.c index c0c4ccfa77..9d46d69bf9 100644 --- a/gtk/gtkarrow.c +++ b/gtk/gtkarrow.c @@ -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) { |