RoomGeneralPage: Move avatar setting outside of FormCard

This commit is contained in:
Carl Schwan
2024-09-20 21:53:32 +02:00
parent d0a915e81c
commit 71468e453c

View File

@@ -21,26 +21,16 @@ FormCard.FormCardPage {
title: i18n("General") title: i18n("General")
FormCard.FormHeader {
title: i18n("Room Information")
}
FormCard.FormCard {
FormCard.AbstractFormDelegate {
background: null
contentItem: RowLayout {
Item {
Layout.fillWidth: true
}
KirigamiComponents.Avatar { KirigamiComponents.Avatar {
id: avatar id: avatar
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignHCenter
Layout.topMargin: Kirigami.Units.gridUnit
name: room.name name: room.name
source: room.avatarMediaId ? root.connection.makeMediaUrl("mxc://" + room.avatarMediaId) : "" source: room.avatarMediaId ? root.connection.makeMediaUrl("mxc://" + room.avatarMediaId) : ""
implicitWidth: Kirigami.Units.iconSizes.enormous implicitWidth: Kirigami.Units.iconSizes.enormous
implicitHeight: Kirigami.Units.iconSizes.enormous implicitHeight: Kirigami.Units.iconSizes.enormous
}
QQC2.Button { QQC2.Button {
Layout.alignment: Qt.AlignLeft
enabled: room.canSendState("m.room.avatar") enabled: room.canSendState("m.room.avatar")
visible: enabled visible: enabled
icon.name: "cloud-upload" icon.name: "cloud-upload"
@@ -57,14 +47,22 @@ FormCard.FormCardPage {
fileDialog.open(); fileDialog.open();
} }
anchors {
bottom: parent.bottom
right: parent.right
}
QQC2.ToolTip.text: text QQC2.ToolTip.text: text
QQC2.ToolTip.visible: hovered QQC2.ToolTip.visible: hovered
} QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
Item {
Layout.fillWidth: true
} }
} }
FormCard.FormHeader {
title: i18n("Room Information")
} }
FormCard.FormCard {
FormCard.FormTextFieldDelegate { FormCard.FormTextFieldDelegate {
id: roomNameField id: roomNameField
label: i18n("Room name:") label: i18n("Room name:")