Commit 4fc6fc14 authored by Volker Krause's avatar Volker Krause

Show disruption information and notes for journeys too

parent 32f22829
......@@ -58,7 +58,7 @@ Kirigami.ScrollablePage {
return Kirigami.Theme.negativeTextColor;
return Kirigami.Theme.positiveTextColor;
}
visible: departure.hasExpectedDepartureTime
visible: departure.hasExpectedDepartureTime || departure.disruption == Disruption.NoService
}
}
RowLayout {
......
......@@ -48,9 +48,17 @@ Kirigami.ScrollablePage {
text: Localizer.formatTime(modelData, "scheduledDepartureTime")
}
QQC2.Label {
text: (modelData.departureDelay >= 0 ? "+" : "") + modelData.departureDelay
color: modelData.departureDelay > 1 ? Kirigami.Theme.negativeTextColor : Kirigami.Theme.positiveTextColor
visible: modelData.hasExpectedDepartureTime
text: {
if (modelData.disruption == Disruption.NoService)
return i18n("Cancelled");
return (modelData.departureDelay >= 0 ? "+" : "") + modelData.departureDelay;
}
color: {
if (modelData.departureDelay > 1 || modelData.disruption == Disruption.NoService)
return Kirigami.Theme.negativeTextColor;
return Kirigami.Theme.positiveTextColor;
}
visible: modelData.hasExpectedDepartureTime || modelData.disruption == Disruption.NoService
}
}
RowLayout {
......@@ -138,6 +146,15 @@ Kirigami.ScrollablePage {
visible: modelData.scheduledArrivalPlatform !== ""
}
}
// optional bottom row: notes
QQC2.Label {
Layout.columnSpan: 2
text: modelData.note
wrapMode: Text.Wrap
visible: modelData.note
font.italic: true
}
}
}
}
......
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