Switch member dialog to using ItemDelegate

This commit is contained in:
Loren Burkholder 2021-11-13 13:46:29 -05:00
parent cf43b7b9f0
commit 8ca1b93abb

View file

@ -85,10 +85,20 @@ ApplicationWindow {
enabled: !Settings.mobileMode enabled: !Settings.mobileMode
} }
delegate: RowLayout { delegate: ItemDelegate {
id: del id: del
onClicked: Rooms.currentRoom.openUserProfile(model.mxid)
padding: Nheko.paddingMedium
width: ListView.view.width width: ListView.view.width
height: memberLayout.implicitHeight
background: Rectangle {
color: roomMembersRoot.color
}
RowLayout {
id: memberLayout
spacing: Nheko.paddingMedium spacing: Nheko.paddingMedium
Avatar { Avatar {
@ -99,7 +109,7 @@ ApplicationWindow {
userid: model.mxid userid: model.mxid
url: model.avatarUrl.replace("mxc://", "image://MxcImage/") url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
displayName: model.displayName displayName: model.displayName
onClicked: Rooms.currentRoom.openUserProfile(model.mxid) enabled: false
} }
ColumnLayout { ColumnLayout {
@ -150,6 +160,13 @@ ApplicationWindow {
} }
CursorShape {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
}
}
footer: Item { footer: Item {
width: parent.width width: parent.width
visible: (members.numUsersLoaded < members.memberCount) && members.loadingMoreMembers visible: (members.numUsersLoaded < members.memberCount) && members.loadingMoreMembers