Commit a42b436f authored by Dimitris Kardarakos's avatar Dimitris Kardarakos

Fix text going out of boundaries

parent 25ba6fe5
Pipeline #3611 failed with stage
in 4 minutes and 19 seconds
......@@ -230,7 +230,8 @@ Kirigami.Page {
Layout.fillWidth: true
Layout.minimumWidth: Kirigami.Units.gridUnit * 4
Layout.minimumHeight: Kirigami.Units.gridUnit * 4
wrapMode: Controls2.TextArea.WordWrap
Layout.maximumWidth: eventCard.width
wrapMode: Text.WrapAnywhere
text: eventData ? eventData.description : ""
placeholderText: qsTr("Description")
}
......
......@@ -69,6 +69,8 @@ Kirigami.Page {
}
delegate: Kirigami.Card {
id: cardDelegate
banner.title: model.summary
banner.titleLevel: 3
......@@ -102,6 +104,7 @@ Kirigami.Page {
property string dateFormat: model.allday ? "ddd d MMM yyyy" : "ddd d MMM yyyy hh:mm"
property string separator: model.allday ? "" : " - "
width: cardDelegate.availableWidth
wrapMode: Text.WordWrap
text: ((model.dtstart && !isNaN(model.dtstart)) ? model.dtstart.toLocaleString(Qt.locale(), dateFormat ) : "") +
(model.dtend && !isNaN(model.dtend) ? separator +
......@@ -109,11 +112,14 @@ Kirigami.Page {
}
Controls2.Label {
width: cardDelegate.availableWidth
wrapMode: Text.WordWrap
text: model.description
}
Controls2.Label {
width: cardDelegate.availableWidth
visible: model.location != ""
wrapMode: Text.WordWrap
text: model.location
......
......@@ -156,7 +156,8 @@ Kirigami.Page {
Layout.fillWidth: true
Layout.minimumWidth: Kirigami.Units.gridUnit * 4
Layout.minimumHeight: Kirigami.Units.gridUnit * 4
wrapMode: Controls2.TextArea.WordWrap
Layout.maximumWidth: todoCard.width
wrapMode: Text.WrapAnywhere
text: todoData ? todoData.description : ""
placeholderText: qsTr("Description")
}
......
......@@ -68,6 +68,8 @@ Kirigami.Page {
}
delegate: Kirigami.Card {
id: cardDelegate
banner.title: model.summary
banner.titleLevel: 3
......@@ -97,17 +99,20 @@ Kirigami.Page {
enabled: !model.completed
Controls2.Label {
width: cardDelegate.availableWidth
wrapMode: Text.WordWrap
text: model.description
}
Controls2.Label {
width: cardDelegate.availableWidth
visible: model.dtstart && !isNaN(model.dtstart)
wrapMode: Text.WordWrap
text: (model.dtstart && !isNaN(model.dtstart)) ? model.dtstart.toLocaleString(Qt.locale(), model.allday ? "ddd d MMM yyyy" : "ddd d MMM yyyy hh:mm" ) : ""
}
Controls2.Label {
width: cardDelegate.availableWidth
visible: model.location != ""
wrapMode: Text.WordWrap
text: model.location
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment