Use ImageItem in MessageDelegate.

This commit is contained in:
Black Hat
2018-09-10 09:51:02 +08:00
parent 13a8d6b889
commit 0f3d7db0d1
11 changed files with 91 additions and 18 deletions

View File

@@ -24,13 +24,14 @@ Drawer {
anchors.fill: parent
anchors.margins: 32
ImageStatus {
ImageItem {
Layout.preferredWidth: 64
Layout.preferredHeight: 64
Layout.alignment: Qt.AlignHCenter
source: room && room.avatarUrl != "" ? "image://mxc/" + room.avatarUrl : null
displayText: room ? room.displayName : ""
hint: room ? room.displayName : "No name"
defaultColor: Util.stringToColor(room ? room.displayName : "No name")
image: matriqueController.safeImage(room ? room.avatar : null)
}
Label {