fixing routing.py bug, if time is 24:00
[pywienerlinien] / qml / SheetListItem.qml
1 import QtQuick 1.1
2 import com.nokia.meego 1.0
3 import com.nokia.extras 1.0
4
5 import "UIConstants.js" as UIConstants
6 import "ExtrasConstants.js" as ExtrasConstants
7
8 Item {
9     property Item selector
10
11     width: parent.width
12     height: 60
13
14     BorderImage {
15         anchors.fill: parent
16         visible: mouseArea.pressed
17         source: theme.inverted ? 'image://theme/meegotouch-list-inverted-background-pressed-vertical-center': 'image://theme/meegotouch-list-background-pressed-vertical-center'
18     }
19
20     BorderImage {
21         anchors.fill: parent
22         visible: selector.selectedIndex == index
23         source: theme.inverted ? 'image://theme/meegotouch-list-inverted-background-selected-vertical-center': 'image://theme/meegotouch-list-background-selected-vertical-center'
24     }
25
26     Item {
27         anchors.fill: parent
28         anchors.margins: UIConstants.DEFAULT_MARGIN
29
30         Text {
31             anchors {
32                 verticalCenter: parent.center
33                 left: parent.left
34                 leftMargin: 10
35                 right: parent.right
36             }
37
38             elide: Text.ElideRight
39
40             text: station
41             font.pixelSize: UIConstants.FONT_DEFAULT
42             font.family: ExtrasConstants.FONT_FAMILY
43
44             color: {
45                 if (theme.inverted) {
46                     (selector.selectedIndex == index) ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
47                 } else {
48                     (selector.selectedIndex != index) ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
49                 }
50             }
51         }
52     }
53
54     MouseArea {
55         id: mouseArea
56         anchors.fill: parent
57         onClicked: selector.selectedIndex = index
58     }
59 }
60