diff --git a/retroshare-qml-app/src/ChatCache.qml b/retroshare-qml-app/src/ChatCache.qml index 34854a083..31826b141 100644 --- a/retroshare-qml-app/src/ChatCache.qml +++ b/retroshare-qml-app/src/ChatCache.qml @@ -133,6 +133,14 @@ QtObject } return "" } + function delIdentityAvatar (gxsId) + { + if (identityDetails[gxsId] && identityDetails[gxsId].avatar !== undefined) + { + identityDetails[gxsId].avatar = "" + } + + } } diff --git a/retroshare-qml-app/src/ContactDetails.qml b/retroshare-qml-app/src/ContactDetails.qml index 3079e0e08..325e9ad50 100644 --- a/retroshare-qml-app/src/ContactDetails.qml +++ b/retroshare-qml-app/src/ContactDetails.qml @@ -75,7 +75,7 @@ Item if (jP.returncode === "ok") { console.log("Avatar changed! ") - topFace.getDetails() + topFace.refresh() } }) } diff --git a/retroshare-qml-app/src/TrustedNodeDetails.qml b/retroshare-qml-app/src/TrustedNodeDetails.qml index 145dab0b4..27b236cdb 100644 --- a/retroshare-qml-app/src/TrustedNodeDetails.qml +++ b/retroshare-qml-app/src/TrustedNodeDetails.qml @@ -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 diff --git a/retroshare-qml-app/src/components/AvatarOrColorHash.qml b/retroshare-qml-app/src/components/AvatarOrColorHash.qml index 77c7e90ef..0db2c5675 100644 --- a/retroshare-qml-app/src/components/AvatarOrColorHash.qml +++ b/retroshare-qml-app/src/components/AvatarOrColorHash.qml @@ -105,6 +105,13 @@ Item } } + function refresh() + { + ChatCache.contactsCache.delIdentityAvatar(gxs_id) + compRoot.avatarAttemptCnt = 0 + getDetails() + + } Component.onCompleted: startComponent () diff --git a/retroshare-qml-app/src/components/TextAndIcon.qml b/retroshare-qml-app/src/components/TextAndIcon.qml index 10951687e..eb1d548ef 100644 --- a/retroshare-qml-app/src/components/TextAndIcon.qml +++ b/retroshare-qml-app/src/components/TextAndIcon.qml @@ -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