[pim/itinerary] src/app: StopoverInformationSheet: Fix sizing of StopoverInformationView
Kai Uwe Broulik <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 3b7aaf8e0d81e48c9c08f6336c28e63bbf4ac264 by Kai Uwe Broulik.
Committed on 26/07/2026 at 20:16.
Pushed by broulik into branch 'master'.
StopoverInformationSheet: Fix sizing of StopoverInformationView
Drop the Column since it would ignore "width" of its children
and the StopoverInformationView is the only child anyway.
This fixes word wrapping not taking any effect.
M +41 -43 src/app/StopoverInformationSheet.qml
https://invent.kde.org/pim/itinerary/-/commit/3b7aaf8e0d81e48c9c08f6336c28e63bbf4ac264
diff --git a/src/app/StopoverInformationSheet.qml b/src/app/StopoverInformationSheet.qml
index e6f4ac6c5..9ec88de7b 100644
--- a/src/app/StopoverInformationSheet.qml
+++ b/src/app/StopoverInformationSheet.qml
@@ -46,49 +46,47 @@ SheetDrawer {
contentWidth: width - effectiveScrollBarWidth
QQC2.ScrollBar.horizontal.policy: QQC2.ScrollBar.AlwaysOff
- ColumnLayout {
- KPublicTransport.StopoverInformationView {
- width: infoPage.width - infoPage.effectiveScrollBarWidth
- stopover: root.stopover
- notes: root.notes
-
- Kirigami.Heading {
- level: 4
- text: i18n("Statistics")
-
- Layout.leftMargin: Kirigami.Units.largeSpacing
- }
-
- QQC2.Label {
- text: i18n("Distance: %1", CoreAddons.Format.formatDistance(journeySection.distance, Settings.distanceFormat))
- visible: root.journeySection.distance > 0
- wrapMode: Text.Wrap
-
- Layout.topMargin: Kirigami.Units.largeSpacing
- Layout.leftMargin: Kirigami.Units.largeSpacing
- Layout.rightMargin: Kirigami.Units.largeSpacing
- Layout.fillWidth: true
- }
-
- QQC2.Label {
- text: i18n("Average Speed: %1", Localizer.formatSpeed(journeySection.distance / journeySection.duration * 3.6, Settings.distanceFormat))
- visible: journeySection.distance > 0 && journeySection.duration > 0
- wrapMode: Text.Wrap
-
- Layout.leftMargin: Kirigami.Units.largeSpacing
- Layout.rightMargin: Kirigami.Units.largeSpacing
- Layout.fillWidth: true
- }
-
- QQC2.Label {
- text: i18n("CO₂: %1", Localizer.formatWeight(journeySection.co2Emission))
- visible: journeySection.co2Emission > 0
- wrapMode: Text.Wrap
-
- Layout.leftMargin: Kirigami.Units.largeSpacing
- Layout.rightMargin: Kirigami.Units.largeSpacing
- Layout.fillWidth: true
- }
+ KPublicTransport.StopoverInformationView {
+ width: infoPage.width - infoPage.effectiveScrollBarWidth
+ stopover: root.stopover
+ notes: root.notes
+
+ Kirigami.Heading {
+ level: 4
+ text: i18n("Statistics")
+
+ Layout.leftMargin: Kirigami.Units.largeSpacing
+ }
+
+ QQC2.Label {
+ text: i18n("Distance: %1", CoreAddons.Format.formatDistance(journeySection.distance, Settings.distanceFormat))
+ visible: root.journeySection.distance > 0
+ wrapMode: Text.Wrap
+
+ Layout.topMargin: Kirigami.Units.largeSpacing
+ Layout.leftMargin: Kirigami.Units.largeSpacing
+ Layout.rightMargin: Kirigami.Units.largeSpacing
+ Layout.fillWidth: true
+ }
+
+ QQC2.Label {
+ text: i18n("Average Speed: %1", Localizer.formatSpeed(journeySection.distance / journeySection.duration * 3.6, Settings.distanceFormat))
+ visible: journeySection.distance > 0 && journeySection.duration > 0
+ wrapMode: Text.Wrap
+
+ Layout.leftMargin: Kirigami.Units.largeSpacing
+ Layout.rightMargin: Kirigami.Units.largeSpacing
+ Layout.fillWidth: true
+ }
+
+ QQC2.Label {
+ text: i18n("CO₂: %1", Localizer.formatWeight(journeySection.co2Emission))
+ visible: journeySection.co2Emission > 0
+ wrapMode: Text.Wrap
+
+ Layout.leftMargin: Kirigami.Units.largeSpacing
+ Layout.rightMargin: Kirigami.Units.largeSpacing
+ Layout.fillWidth: true
}
}
}