Use FormTextAreaDelegate

This commit is contained in:
Carl Schwan
2024-09-20 22:01:30 +02:00
parent e4e5d14d6e
commit b9615eadb3

View File

@@ -71,26 +71,15 @@ FormCard.FormCardPage {
text: room.name text: room.name
readOnly: !room.canSendState("m.room.name") readOnly: !room.canSendState("m.room.name")
} }
FormCard.AbstractFormDelegate {
FormCard.FormTextAreaDelegate {
id: roomTopicField id: roomTopicField
background: Item {} label: i18n("Room topic:")
contentItem: ColumnLayout {
QQC2.Label {
id: roomTopicLabel
text: i18n("Room topic:")
Layout.fillWidth: true
}
QQC2.TextArea {
id: roomTopicTextArea
Accessible.description: roomTopicLabel.text Accessible.description: roomTopicLabel.text
Layout.fillWidth: true
wrapMode: TextEdit.Wrap
text: room.topic text: room.topic
readOnly: !room.canSendState("m.room.topic") readOnly: !room.canSendState("m.room.topic")
onTextChanged: roomTopicField.text = text onTextChanged: roomTopicField.text = text
} }
}
}
FormCard.AbstractFormDelegate { FormCard.AbstractFormDelegate {
visible: !roomNameField.readOnly || !roomTopicTextArea.readOnly visible: !roomNameField.readOnly || !roomTopicTextArea.readOnly
background: Item {} background: Item {}