Use FormTextAreaDelegate
This commit is contained in:
@@ -71,25 +71,14 @@ 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 {
|
Accessible.description: roomTopicLabel.text
|
||||||
QQC2.Label {
|
text: room.topic
|
||||||
id: roomTopicLabel
|
readOnly: !room.canSendState("m.room.topic")
|
||||||
text: i18n("Room topic:")
|
onTextChanged: roomTopicField.text = text
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
FormCard.AbstractFormDelegate {
|
FormCard.AbstractFormDelegate {
|
||||||
visible: !roomNameField.readOnly || !roomTopicTextArea.readOnly
|
visible: !roomNameField.readOnly || !roomTopicTextArea.readOnly
|
||||||
|
|||||||
Reference in New Issue
Block a user