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