forked from AuroraMiddleware/gtk
render: fix arrow orientation
The rotation code in the draw_arrow function was assuming that the arrow would be drawn pointing upwards but it was pointing to the right resulting in the rotated arrows pointing in the wrong direction. The recent refactoring caused a pi/2 rotation to be lost. Rather than adding that back somehwere (to lose it again in the future), we just draw the arrow pointing upwards as it is expected to do with a 0 angle.
This commit is contained in:
parent
da163469f9
commit
8836a0d6ce
@ -243,7 +243,6 @@ gtk_css_image_builtin_draw_arrow (GtkCssImage *image,
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
cairo_translate (cr, size / 4.0, 0);
|
||||
|
||||
line_width = size / 3.0 / sqrt (2);
|
||||
cairo_set_line_width (cr, line_width);
|
||||
@ -254,9 +253,9 @@ gtk_css_image_builtin_draw_arrow (GtkCssImage *image,
|
||||
(size / (size + line_width)),
|
||||
(size / (size + line_width)));
|
||||
|
||||
cairo_move_to (cr, -size / 2.0, -size / 2.0);
|
||||
cairo_move_to (cr, -size / 2.0, size / 4.0);
|
||||
cairo_rel_line_to (cr, size / 2.0, -size / 2.0);
|
||||
cairo_rel_line_to (cr, size / 2.0, size / 2.0);
|
||||
cairo_rel_line_to (cr, - size / 2.0, size / 2.0);
|
||||
|
||||
gdk_cairo_set_source_rgba (cr, &builtin->fg_color);
|
||||
cairo_stroke (cr);
|
||||
|
Loading…
Reference in New Issue
Block a user