mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 14:18:49 +03:00
Switch member dialog to using ItemDelegate
This commit is contained in:
parent
cf43b7b9f0
commit
8ca1b93abb
1 changed files with 64 additions and 47 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue