Commit 87c1119f authored by Volker Krause's avatar Volker Krause

Show iconized summary of the journey in collapsed mode

parent 3a96febd
......@@ -202,9 +202,33 @@ Kirigami.ScrollablePage {
Layout.fillWidth: true
boundsBehavior: Flickable.StopAtBounds
}
QQC2.Label {
text: i18np("One change", "%1 changes", journey.numberOfChanges)
RowLayout {
visible: journeyView.currentIndex != index
Layout.fillWidth: true
Repeater {
model: journey.sections
delegate: Kirigami.Icon {
source: {
switch (modelData.mode) {
case JourneySection.PublicTransport:
return PublicTransport.lineModeIcon(modelData.route.line.mode);
case JourneySection.Walking: return "qrc:///images/walk.svg";
case JourneySection.Waiting: return "qrc:///images/wait.svg";
case JourneySection.Transfer: return "qrc:///images/transfer.svg";
default: return "question";
}
}
width: Kirigami.Units.iconSizes.small
height: width
isMask: true
Layout.preferredWidth: Kirigami.Units.iconSizes.small
Layout.preferredHeight: Kirigami.Units.iconSizes.small
}
}
QQC2.Label {
text: i18np("One change", "%1 changes", journey.numberOfChanges)
visible: journeyView.currentIndex != index
}
}
}
......
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