From 10af7615316fd91eef61cc66a8ede38a2bff3fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 19 Aug 2015 16:25:31 +0200 Subject: Imported Upstream version 0.6.5 --- src/images/themedIcon.vala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/images/themedIcon.vala') diff --git a/src/images/themedIcon.vala b/src/images/themedIcon.vala index b7b6f74..9f4ca8a 100644 --- a/src/images/themedIcon.vala +++ b/src/images/themedIcon.vala @@ -74,6 +74,7 @@ public class ThemedIcon : Image { if (layer.layer_type == SliceLayer.Type.ICON) { ctx.push_group(); + ctx.translate(layer.x, layer.y); layer.image.paint_on(ctx); ctx.set_operator(Cairo.Operator.IN); @@ -86,6 +87,7 @@ public class ThemedIcon : Image { } icon.paint_on(ctx); + ctx.translate(-layer.x, -layer.y); ctx.pop_group_to_source(); ctx.paint(); @@ -93,11 +95,13 @@ public class ThemedIcon : Image { } else if (layer.layer_type == SliceLayer.Type.CAPTION) { Image text = new RenderedText(caption, layer.width, layer.height, layer.font, layer.color, Config.global.global_scale); - ctx.translate(0, layer.position); + ctx.translate(layer.x, layer.y); text.paint_on(ctx); - ctx.translate(0, -layer.position); + ctx.translate(-layer.x, -layer.y); } else if (layer.layer_type == SliceLayer.Type.FILE) { + ctx.translate(layer.x, layer.y); layer.image.paint_on(ctx); + ctx.translate(-layer.x, -layer.y); } // colorize the whole layer if neccasary -- cgit v1.2.3