Commit bbfa29d3 authored by Volker Krause's avatar Volker Krause

Replace transport type Unicode emojis with icons

parent 229eff58
......@@ -107,6 +107,7 @@ if (ANDROID)
help-about
map-symbolic
meeting-attending
question
settings-configure
view-calendar-day
view-refresh
......
......@@ -68,46 +68,48 @@ Kirigami.ScrollablePage {
// middle row: mode symbol, transport mode, duration
Rectangle {
color: modelData.route.line.hasColor ? modelData.route.line.color : "transparent"
implicitHeight: modeIcon.implicitHeight
implicitWidth: modeIcon.implicitWidth
implicitHeight: modeIcon.height
implicitWidth: modeIcon.width
Layout.alignment: Qt.AlignHCenter
QQC2.Label {
Kirigami.Icon {
id: modeIcon
anchors.centerIn: parent
text: {
source: {
switch (modelData.mode) {
case JourneySection.PublicTransport:
{
switch (modelData.route.line.mode) {
case Line.Air: return "✈️";
case Line.Boat: return "🛥️";
case Line.Bus: return "🚍";
case Line.BusRapidTransit: return "🚌";
case Line.Coach: return "🚌";
case Line.Ferry: return "⛴️";
case Line.Funicular: return "🚞";
case Line.LocalTrain: return "🚆";
case Line.LongDistanceTrain: return "🚄";
case Line.Metro: return "🚇";
case Line.RailShuttle: return "🚅";
case Line.RapidTransit: return "🚊";
case Line.Shuttle: return "🚐";
case Line.Taxi: return "🚕";
case Line.Train: return "🚆";
case Line.Tramway: return "🚈";
default: return "?";
case Line.Air: return "qrc:///images/flight.svg";
case Line.Boat: return "qrc:///images/ferry.svg";
case Line.Bus: return "qrc:///images/bus.svg";
case Line.BusRapidTransit: return "qrc:///images/coach.svg";
case Line.Coach: return "qrc:///images/coach.svg";
case Line.Ferry: return "qrc:///images/ferry.svg";
case Line.Funicular: return "qrc:///images/Funicular.svg";
case Line.LocalTrain: return "qrc:///images/train.svg";
case Line.LongDistanceTrain: return "qrc:///images/longdistancetrain.svg";
case Line.Metro: return "qrc:///images/subway.svg";
case Line.RailShuttle: return "qrc:///images/rapidtransit.svg";
case Line.RapidTransit: return "qrc:///images/rapidtransit.svg";
case Line.Shuttle: return "qrc:///images/shuttle.svg";
case Line.Taxi: return "qrc:///images/taxi.svg";
case Line.Train: return "qrc:///images/train.svg";
case Line.Tramway: return "qrc:///images/tramway.svg";
default: return "question";
}
break;
}
case JourneySection.Walking: return "🚶";
case JourneySection.Waiting: return "";
case JourneySection.Transfer: return "";
default: return "?";
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";
}
}
color: modelData.route.line.hasTextColor ? modelData.route.line.textColor : Kirigami.Theme.textColor
font.pointSize: Kirigami.Theme.defaultFont.pointSize * 2
width: Kirigami.Units.iconSizes.medium
height: width
isMask: true
}
}
QQC2.Label {
......
......@@ -47,9 +47,22 @@
<file>+android/ImportDialog.qml</file>
<file>images/bus.svg</file>
<file>images/car.svg</file>
<file>images/cablecar.svg</file>
<file>images/car.svg</file>
<file>images/coach.svg</file>
<file>images/ferry.svg</file>
<file>images/flight.svg</file>
<file>images/foodestablishment.svg</file>
<file>images/funicular.svg</file>
<file>images/longdistancetrain.svg</file>
<file>images/rapidtransit.svg</file>
<file>images/shuttle.svg</file>
<file>images/subway.svg</file>
<file>images/taxi.svg</file>
<file>images/train.svg</file>
<file>images/tramway.svg</file>
<file>images/transfer.svg</file>
<file>images/wait.svg</file>
<file>images/walk.svg</file>
</qresource>
</RCC>
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