mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 08:40:08 +00:00
arrow: x and y coordinates of the arrow rendering should be double
To prevent off-by-one rounding errors when drawing them later.
This commit is contained in:
parent
230bd4b461
commit
fa4fb6724c
@ -312,7 +312,8 @@ gtk_arrow_draw (GtkWidget *widget,
|
|||||||
GtkMisc *misc = GTK_MISC (widget);
|
GtkMisc *misc = GTK_MISC (widget);
|
||||||
GtkStyleContext *context;
|
GtkStyleContext *context;
|
||||||
GtkStateFlags state;
|
GtkStateFlags state;
|
||||||
gint x, y, width, height;
|
gdouble x, y;
|
||||||
|
gint width, height;
|
||||||
gint extent;
|
gint extent;
|
||||||
gint xpad, ypad;
|
gint xpad, ypad;
|
||||||
gfloat xalign, yalign;
|
gfloat xalign, yalign;
|
||||||
@ -344,8 +345,8 @@ gtk_arrow_draw (GtkWidget *widget,
|
|||||||
effective_arrow_type = GTK_ARROW_LEFT;
|
effective_arrow_type = GTK_ARROW_LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
x = floor (xpad + ((width - extent) * xalign));
|
x = xpad + ((width - extent) * xalign);
|
||||||
y = floor (ypad + ((height - extent) * yalign));
|
y = ypad + ((height - extent) * yalign);
|
||||||
|
|
||||||
switch (effective_arrow_type)
|
switch (effective_arrow_type)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user