Skip to content
Snippets Groups Projects
Commit 07aa89cc authored by Loren Burkholder's avatar Loren Burkholder
Browse files

Port invite dialog to use ItemDelegate

parent d645c436
Branches flatpak-test
No related tags found
No related merge requests found
......@@ -98,37 +98,53 @@ ApplicationWindow {
Layout.fillWidth: true
Layout.fillHeight: true
model: invitees
spacing: Nheko.paddingMedium
delegate: RowLayout {
spacing: Nheko.paddingMedium
delegate: ItemDelegate {
id: del
Avatar {
width: Nheko.avatarSize
height: Nheko.avatarSize
userid: model.mxid
url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
displayName: model.displayName
onClicked: TimelineManager.openGlobalUserProfile(model.mxid)
hoverEnabled: true
width: ListView.view.width
height: layout.implicitHeight
onClicked: TimelineManager.openGlobalUserProfile(model.mxid)
background: Rectangle {
color: del.hovered ? Nheko.colors.dark : inviteDialogRoot.color
}
ColumnLayout {
spacing: Nheko.paddingSmall
RowLayout {
id: layout
Label {
text: model.displayName
color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window)
font.pointSize: fontMetrics.font.pointSize
}
spacing: Nheko.paddingMedium
Label {
text: model.mxid
color: Nheko.colors.buttonText
font.pointSize: fontMetrics.font.pointSize * 0.9
Avatar {
width: Nheko.avatarSize
height: Nheko.avatarSize
userid: model.mxid
url: model.avatarUrl.replace("mxc://", "image://MxcImage/")
displayName: model.displayName
enabled: false
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
ColumnLayout {
spacing: Nheko.paddingSmall
Label {
text: model.displayName
color: TimelineManager.userColor(model ? model.mxid : "", Nheko.colors.window)
font.pointSize: fontMetrics.font.pointSize
}
Label {
text: model.mxid
color: Nheko.colors.buttonText
font.pointSize: fontMetrics.font.pointSize * 0.9
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment