Wrap text in poll delegates

BUG: 477629
This commit is contained in:
Tobias Fella
2023-11-27 20:44:19 +00:00
parent 79940f707f
commit 5e12f50899

View File

@@ -33,10 +33,13 @@ MessageDelegate {
Label {
id: questionLabel
text: root.content["org.matrix.msc3381.poll.start"]["question"]["body"]
wrapMode: Text.Wrap
Layout.fillWidth: true
}
Repeater {
model: root.content["org.matrix.msc3381.poll.start"]["answers"]
delegate: RowLayout {
Layout.fillWidth: true
CheckBox {
checked: root.pollHandler.answers[currentRoom.localUser.id] ? root.pollHandler.answers[currentRoom.localUser.id].includes(modelData["id"]) : false
onClicked: root.pollHandler.sendPollAnswer(root.eventId, modelData["id"])
@@ -44,9 +47,8 @@ MessageDelegate {
}
Label {
text: modelData["org.matrix.msc1767.text"]
}
Item {
Layout.fillWidth: true
wrapMode: Text.Wrap
}
Label {
visible: root.content["org.matrix.msc3381.poll.start"]["kind"] == "org.matrix.msc3381.poll.disclosed" || pollHandler.hasEnded