mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge branch 'qml_app_face_generator' into GSoC2017-evaluation-final
This commit is contained in:
commit
18f7733a80
@ -13,17 +13,17 @@ Item
|
|||||||
|
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
id: faceAvatar
|
id: imageAvatar
|
||||||
width: iconSize
|
width: height
|
||||||
height: iconSize
|
height: iconSize
|
||||||
visible: true
|
visible: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Canvas
|
Canvas
|
||||||
{
|
{
|
||||||
id: faceCanvas
|
id: canvasAvatar
|
||||||
width: iconSize
|
width: height
|
||||||
height: iconSize
|
height: canvasSizes
|
||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
renderStrategy: Canvas.Threaded;
|
renderStrategy: Canvas.Threaded;
|
||||||
@ -134,11 +134,11 @@ Item
|
|||||||
{
|
{
|
||||||
var url = src(gender, i, data[i+1])
|
var url = src(gender, i, data[i+1])
|
||||||
onloads.push(url)
|
onloads.push(url)
|
||||||
faceCanvas.loadImage(url)
|
canvasAvatar.loadImage(url)
|
||||||
}
|
}
|
||||||
faceCanvas.images = onloads
|
canvasAvatar.images = onloads
|
||||||
faceCanvas.callback = callback
|
canvasAvatar.callback = callback
|
||||||
faceCanvas.requestPaint()
|
canvasAvatar.requestPaint()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the identicon
|
// Create the identicon
|
||||||
@ -154,14 +154,20 @@ Item
|
|||||||
// See issue: https://gitlab.com/angesoc/RetroShare/issues/37
|
// See issue: https://gitlab.com/angesoc/RetroShare/issues/37
|
||||||
if (facesCache.iconCache[iconId])
|
if (facesCache.iconCache[iconId])
|
||||||
{
|
{
|
||||||
faceAvatar.source = data
|
imageAvatar.source = data
|
||||||
faceAvatar.visible = true
|
imageAvatar.visible = true
|
||||||
faceCanvas.visible = false
|
canvasAvatar.visible = false
|
||||||
|
|
||||||
|
canvasAvatar.height = 0
|
||||||
|
imageAvatar.height = iconSize
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
faceCanvas.visible = true
|
canvasAvatar.visible = true
|
||||||
faceAvatar.visible = false
|
imageAvatar.visible = false
|
||||||
|
|
||||||
|
canvasAvatar.height = iconSize
|
||||||
|
imageAvatar.height = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
facesCache.iconCache[iconId] = data;
|
facesCache.iconCache[iconId] = data;
|
||||||
|
Loading…
Reference in New Issue
Block a user