summaryrefslogtreecommitdiff
path: root/src/images/themedIcon.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-08-19 16:25:34 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-08-19 16:25:34 +0200
commit08d469c9ea5a5bdf186a4aa11f003affac1962e4 (patch)
tree52ec76e484c8c747e6b8d6cabaa4bb5c80536d68 /src/images/themedIcon.vala
parent601eaec7bdaf999574df69c41e41a1383921580b (diff)
parent10af7615316fd91eef61cc66a8ede38a2bff3fdc (diff)
Merge tag 'upstream/0.6.5'
Upstream version 0.6.5
Diffstat (limited to 'src/images/themedIcon.vala')
-rw-r--r--src/images/themedIcon.vala8
1 files changed, 6 insertions, 2 deletions
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