mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Port invite dialog to use ItemDelegate
This commit is contained in:
parent
d645c43618
commit
07aa89cca1
1 changed files with 39 additions and 23 deletions
|
@ -98,8 +98,22 @@ ApplicationWindow {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
model: invitees
|
model: invitees
|
||||||
|
spacing: Nheko.paddingMedium
|
||||||
|
|
||||||
|
delegate: ItemDelegate {
|
||||||
|
id: del
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
width: ListView.view.width
|
||||||
|
height: layout.implicitHeight
|
||||||
|
onClicked: TimelineManager.openGlobalUserProfile(model.mxid)
|
||||||
|
background: Rectangle {
|
||||||
|
color: del.hovered ? Nheko.colors.dark : inviteDialogRoot.color
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: layout
|
||||||
|
|
||||||
delegate: RowLayout {
|
|
||||||
spacing: Nheko.paddingMedium
|
spacing: Nheko.paddingMedium
|
||||||
|
|
||||||
Avatar {
|
Avatar {
|
||||||
|
@ -108,7 +122,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: TimelineManager.openGlobalUserProfile(model.mxid)
|
enabled: false
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
@ -139,6 +153,8 @@ ApplicationWindow {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
footer: DialogButtonBox {
|
footer: DialogButtonBox {
|
||||||
id: buttons
|
id: buttons
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue