Now the delay class is shown as a bar on the left of the schedule item.
resources/harmattan/qml/StationListPage.js \
resources/harmattan/qml/AboutPage.qml \
resources/harmattan/qml/InfoBar.qml \
- resources/harmattan/qml/DroppedShadow.qml
+ resources/harmattan/qml/DroppedShadow.qml \
+ resources/harmattan/qml/DelayIndicator.qml
unix {
isEmpty(PREFIX) {
INSTALLS += qml
}
+
--- /dev/null
+import QtQuick 1.0
+import "uiconstants.js" as UiConstants
+
+Item {
+ id: indicator
+ property int level: 0
+ width: UiConstants.DefaultMargin
+ anchors{
+ top: parent.top
+ bottom: parent.bottom
+ }
+ Rectangle {
+ id: rect
+ width: 10
+ height: parent.height
+ anchors.left: parent.left
+ color: {
+ switch (indicator.level) {
+ case 0: return "#0b0"
+ case 1: return "#dd0"
+ case 2: return "#da0"
+ case 3: return "#d60"
+ case 4: return "#d00"
+ default: return "#b0b"
+ }
+ }
+ }
+}
}
Row {
anchors.fill: parent
-
spacing: UiConstants.ButtonSpacing
+ DelayIndicator {
+ level: delayClass
+ }
Column {
anchors.verticalCenter: parent.verticalCenter
Row {