Fix canvas face displaced down

This commit is contained in:
Angela Mazzurco 2017-08-13 13:04:54 +02:00
parent 5a1a84fc5d
commit a87c31f2dc

View File

@ -14,7 +14,7 @@ Item
Image Image
{ {
id: imageAvatar id: imageAvatar
width: iconSize width: height
height: iconSize height: iconSize
visible: true visible: true
} }
@ -22,8 +22,8 @@ Item
Canvas Canvas
{ {
id: canvasAvatar id: canvasAvatar
width: iconSize width: height
height: iconSize height: canvasSizes
visible: false visible: false
renderStrategy: Canvas.Threaded; renderStrategy: Canvas.Threaded;
@ -157,11 +157,17 @@ Item
imageAvatar.source = data imageAvatar.source = data
imageAvatar.visible = true imageAvatar.visible = true
canvasAvatar.visible = false canvasAvatar.visible = false
canvasAvatar.height = 0
imageAvatar.height = iconSize
} }
else else
{ {
canvasAvatar.visible = true canvasAvatar.visible = true
imageAvatar.visible = false imageAvatar.visible = false
canvasAvatar.height = iconSize
imageAvatar.height = 0
} }
facesCache.iconCache[iconId] = data; facesCache.iconCache[iconId] = data;