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 "" 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") if (jP.returncode === "ok")
{ {
console.log("Avatar changed! ") console.log("Avatar changed! ")
topFace.getDetails() topFace.refresh()
} }
}) })
} }

View File

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

View File

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

View File

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