GtkWindow: Fix the down-scaling in icon_from_list()

Must use floating-point division to get the correct scale factors.
cairo_set_source_surface() must be called after cairo_scale().

https://bugzilla.gnome.org/show_bug.cgi?id=790287
This commit is contained in:
Kjell Ahlstedt 2017-11-13 12:48:57 +01:00 committed by Matthias Clasen
parent 70ff1ef216
commit 7ef5858f8d

View File

@ -4544,10 +4544,10 @@ icon_from_list (GList *list,
target = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, size, size);
cr = cairo_create (target);
cairo_set_source_surface (cr, source , 0, 0);
cairo_scale (cr,
size / gdk_texture_get_width (texture),
size / gdk_texture_get_height (texture));
(double) size / gdk_texture_get_width (texture),
(double) size / gdk_texture_get_height (texture));
cairo_set_source_surface (cr, source, 0, 0);
cairo_paint (cr);
cairo_destroy (cr);
cairo_surface_destroy (source);