From b9615eadb356beefc23ef617bf85277d137b3f62 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 20 Sep 2024 22:01:30 +0200 Subject: [PATCH] Use FormTextAreaDelegate --- src/settings/RoomGeneralPage.qml | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/settings/RoomGeneralPage.qml b/src/settings/RoomGeneralPage.qml index bc816b56e..49b9788f3 100644 --- a/src/settings/RoomGeneralPage.qml +++ b/src/settings/RoomGeneralPage.qml @@ -71,25 +71,14 @@ FormCard.FormCardPage { text: room.name readOnly: !room.canSendState("m.room.name") } - FormCard.AbstractFormDelegate { + + FormCard.FormTextAreaDelegate { id: roomTopicField - background: Item {} - contentItem: ColumnLayout { - QQC2.Label { - id: roomTopicLabel - text: i18n("Room topic:") - Layout.fillWidth: true - } - QQC2.TextArea { - id: roomTopicTextArea - Accessible.description: roomTopicLabel.text - Layout.fillWidth: true - wrapMode: TextEdit.Wrap - text: room.topic - readOnly: !room.canSendState("m.room.topic") - onTextChanged: roomTopicField.text = text - } - } + label: i18n("Room topic:") + Accessible.description: roomTopicLabel.text + text: room.topic + readOnly: !room.canSendState("m.room.topic") + onTextChanged: roomTopicField.text = text } FormCard.AbstractFormDelegate { visible: !roomNameField.readOnly || !roomTopicTextArea.readOnly