mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
image: Don't translate twice
The animation can pass x/y through to the render_icon() function, so don't gtk_snapshot_translate() it.
This commit is contained in:
parent
92a1abcd23
commit
970f99615e
@ -1453,7 +1453,6 @@ gtk_image_render_contents (GtkCssGadget *gadget,
|
||||
|
||||
x += (width - w) / 2;
|
||||
|
||||
gtk_snapshot_translate_2d (snapshot, x, y);
|
||||
if (gtk_image_get_storage_type (image) == GTK_IMAGE_ANIMATION)
|
||||
{
|
||||
GtkStyleContext *context = gtk_widget_get_style_context (widget);
|
||||
@ -1465,9 +1464,10 @@ gtk_image_render_contents (GtkCssGadget *gadget,
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_snapshot_translate_2d (snapshot, x, y);
|
||||
gtk_icon_helper_snapshot (priv->icon_helper, snapshot);
|
||||
gtk_snapshot_translate_2d (snapshot, -x, -y);
|
||||
}
|
||||
gtk_snapshot_translate_2d (snapshot, -x, -y);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user