@@ -48,28 +48,24 @@ LocalComponents.Page {
48 ListItem {
48 ListItem {
50 objectName: "tz"
50 objectName: "tz"
51− property QtObject tzData: null
52− readonly property bool currentTz: !!tzData ? selectedTimeZone === tzData.id : false
51+ readonly property bool currentTz: !!id ? selectedTimeZone === id : false
54+ anchors.verticalCenter: parent.verticalCenter
55− id: cityLabel
56+ id: cityLabel
56− text: !!tzData ? tzData.city : ""
57+ text: !!city ? city : ""
57− anchors.left: parent.left
58− anchors.top: parent.top
59− anchors.topMargin: units.gu(3)
60− font.weight: tz.currentTz ? Font.Normal : Font.Light
58+ font.weight: tz.currentTz ? Font.Normal : Font.Light
61− fontSize: "medium"
59+ fontSize: "medium"
62− color: "#525252"
60+ color: "#525252"
65− id: timeLabel
63+ id: timeLabel
66− text: !!tzData ? tzData.time + " " + tzData.abbreviation : ""
64+ text: !!time ? time + " " + abbreviation : ""
67− anchors.left: parent.left
68− anchors.bottom: parent.bottom
69− anchors.bottomMargin: units.gu(3)
70− font.weight: tz.currentTz ? Font.Normal : Font.Light
65+ font.weight: tz.currentTz ? Font.Normal : Font.Light
71− fontSize: "small"
66+ fontSize: "small"
72− color: "#525252"
67+ color: "#525252"
@@ -84,18 +80,12 @@ LocalComponents.Page {
86 onClicked: {
82 onClicked: {
87− tzModel.selectedZoneId = tzData.id
83+ tzModel.selectedZoneId = id
88 print("Selected tz: " + selectedTimeZone)
84 print("Selected tz: " + selectedTimeZone)
95− anchors.centerIn: parent
100 id: column
90 id: column
101 anchors.fill: content
91 anchors.fill: content
@@ -109,41 +99,24 @@ LocalComponents.Page {
109 color: UbuntuColors.lightGrey
99 color: UbuntuColors.lightGrey
112− Flickable {
102+ ListView {
113− anchors.left: parent.left
103+ id: tzList;
114− anchors.right: parent.right
115− height: column.height - searchField.height - column.spacing - topMargin
116− contentHeight: contentItem.childrenRect.height
118− flickDeceleration: 1500 * units.gridUnit / 8
119− maximumFlickVelocity: 2500 * units.gridUnit / 8
120− boundsBehavior: (contentHeight > height) ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
122− Column {
105+ boundsBehavior: Flickable.StopAtBounds;
123− anchors.left: parent.left
106+ clip: true;
124− anchors.right: parent.right
107+ currentIndex: -1
125−
108+ snapMode: ListView.SnapToItem
127− id: tzList
110+ anchors {
128− model: tzFilterModel
111+ left: parent.left;
129− delegate: Loader {
112+ right: parent.right;
131− anchors.left: !!parent ? parent.left : undefined
132− anchors.right: !!parent ? parent.right : undefined
133− height: units.gu(11)
135− sourceComponent: tzComponent
138− item.tzData = Qt.binding(function() { return model; });
139− busyIndicator.running = false
143− print("Displaying " + tzList.count + " items")
115+ height: column.height - searchField.height - column.spacing - topMargin
117+ model: tzFilterModel
119+ delegate: tzComponent