PollComponent: Apply word wrapping on long messages
Long messages were not wrapped and would overflow. Correctly apply word wrapping and align all elements on the top of a row.
This commit is contained in:
@@ -92,23 +92,31 @@ ColumnLayout {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
QQC2.CheckBox {
|
QQC2.CheckBox {
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
|
||||||
enabled: !root.pollHandler.hasEnded
|
enabled: !root.pollHandler.hasEnded
|
||||||
checked: answerDelegate.localChoice
|
checked: answerDelegate.localChoice
|
||||||
|
|
||||||
onClicked: answerDelegate.clicked()
|
onClicked: answerDelegate.clicked()
|
||||||
}
|
}
|
||||||
QQC2.Label {
|
QQC2.Label {
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
text: answerDelegate.answerText
|
text: answerDelegate.answerText
|
||||||
|
wrapMode: QQC2.Label.WordWrap
|
||||||
}
|
}
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
|
||||||
implicitWidth: Kirigami.Units.iconSizes.small
|
implicitWidth: Kirigami.Units.iconSizes.small
|
||||||
implicitHeight: implicitWidth
|
implicitHeight: implicitWidth
|
||||||
visible: answerDelegate.isWinner
|
visible: answerDelegate.isWinner
|
||||||
source: "favorite-favorited"
|
source: "favorite-favorited"
|
||||||
}
|
}
|
||||||
QQC2.Label {
|
QQC2.Label {
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
|
||||||
visible: root.pollHandler.kind == PollKind.Disclosed || root.pollHandler.hasEnded
|
visible: root.pollHandler.kind == PollKind.Disclosed || root.pollHandler.hasEnded
|
||||||
horizontalAlignment: Text.AlignRight
|
horizontalAlignment: Text.AlignRight
|
||||||
text: i18ncp("@info", "%1 Vote", "%1 Votes", answerDelegate.count)
|
text: i18ncp("@info", "%1 Vote", "%1 Votes", answerDelegate.count)
|
||||||
|
|||||||
Reference in New Issue
Block a user