Merge branch 'qml_app_ui_improvements' into GSoC2017-evaluation-II

This commit is contained in:
Angela Mazzurco 2017-07-26 14:56:22 +02:00
commit e72b0d8eeb
5 changed files with 26 additions and 9 deletions

View File

@ -133,6 +133,14 @@ QtObject
}
return ""
}
function delIdentityAvatar (gxsId)
{
if (identityDetails[gxsId] && identityDetails[gxsId].avatar !== undefined)
{
identityDetails[gxsId].avatar = ""
}
}
}

View File

@ -75,7 +75,7 @@ Item
if (jP.returncode === "ok")
{
console.log("Avatar changed! ")
topFace.getDetails()
topFace.refresh()
}
})
}

View File

@ -96,6 +96,8 @@ Item
clip: true
snapMode: ListView.SnapToItem
spacing:7
header:Rectangle
{
color: "aliceblue"
@ -132,10 +134,10 @@ Item
Column
{
id: innerCol
height: 60
height: idRow.height + gxsInfo.height
width: parent.width
leftPadding: 4
spacing: 4
spacing: 6
Row
{
@ -165,6 +167,7 @@ Item
TextAndIcon
{
id: gxsInfo
width: parent.width
innerText: model.peer_id
anchors.horizontalCenter: parent.horizontalCenter
@ -173,8 +176,6 @@ Item
}
}
}
}
Row

View File

@ -105,6 +105,13 @@ Item
}
}
function refresh()
{
ChatCache.contactsCache.delIdentityAvatar(gxs_id)
compRoot.avatarAttemptCnt = 0
getDetails()
}
Component.onCompleted: startComponent ()

View File

@ -4,18 +4,19 @@ import QtQuick.Controls 2.0
Item
{
height: icon.height + 5
height: innerText.implicitHeight
property int iconHeight: 25
property alias iconUrl: icon.source
property alias innerText: innerText.text
Image
{
id: icon
height: innerText.contentHeight
width: innerText.contentHeight
height: iconHeight
width: height
fillMode: Image.PreserveAspectFit
anchors.left: parent.left