@@ -39,6 +39,10 @@ LocalComponents.Page {
39 filter: searchField.text
39 filter: searchField.text
42+ Component.onCompleted: {
43+ theme.palette.normal.backgroundText = UbuntuColors.lightGrey // "fix" the placeholder text in the search field
42 Component {
46 Component {
43 id: tzComponent
47 id: tzComponent
44 ListItem {
48 ListItem {
@@ -52,37 +56,36 @@ LocalComponents.Page {
52 text: !!tzData ? tzData.city : ""
56 text: !!tzData ? tzData.city : ""
53 anchors.left: parent.left
57 anchors.left: parent.left
54 anchors.top: parent.top
58 anchors.top: parent.top
59+ anchors.topMargin: units.gu(3)
55− font.bold: tz.currentTz ? true : false
60+ font.weight: tz.currentTz ? Font.Normal : Font.Light
58 id: timeLabel
65 id: timeLabel
59− text: !!tzData ? tzData.time : ""
66+ text: !!tzData ? tzData.time + " " + tzData.abbreviation : ""
60− anchors.right: parent.right
61− anchors.top: parent.top
62− font.bold: tz.currentTz ? true : false
66− text: !!tzData ? tzData.country : ""
67 anchors.left: parent.left
67 anchors.left: parent.left
68− anchors.top: cityLabel.bottom
68+ anchors.bottom: parent.bottom
69+ anchors.bottomMargin: units.gu(3)
70+ font.weight: tz.currentTz ? Font.Normal : Font.Light
69− fontSize: "x-small"
71+ fontSize: "medium"
77+ verticalCenter: parent.verticalCenter;
79+ fillMode: Image.PreserveAspectFit
80+ height: cityLabel.paintedHeight
72− Label {
82+ source: "data/tick@30.png"
73− id: abbrevLabel
83+ visible: tz.currentTz
74− text: !!tzData ? tzData.abbreviation : ""
75− anchors.right: parent.right
76− anchors.top: timeLabel.bottom
82− onClicked: {
86+ onClicked: {
83− tzModel.selectedZoneId = tzData.id
87+ tzModel.selectedZoneId = tzData.id
84− print("Selected tz: " + selectedTimeZone)
88+ print("Selected tz: " + selectedTimeZone)
@@ -95,25 +98,21 @@ LocalComponents.Page {
97 id: column
100 id: column
98− spacing: units.gu(2)
101+ spacing: units.gu(4)
99− anchors.leftMargin: leftMargin
102+ anchors.fill: content
100− anchors.rightMargin: rightMargin
103+ anchors.topMargin: units.gu(4)
101− anchors.top: content.top
102− anchors.bottom: content.bottom
103− anchors.left: tzPage.left
104− anchors.right: tzPage.right
106 TextField {
105 TextField {
107 id: searchField
106 id: searchField
108 anchors.left: parent.left
107 anchors.left: parent.left
109 anchors.right: parent.right
108 anchors.right: parent.right
110 placeholderText: i18n.tr("Enter your city")
109 placeholderText: i18n.tr("Enter your city")
110+ color: UbuntuColors.darkGrey
113 Flickable {
113 Flickable {
114 anchors.left: parent.left
114 anchors.left: parent.left
115 anchors.right: parent.right
115 anchors.right: parent.right
116− anchors.topMargin: topMargin
117 height: column.height - searchField.height - column.spacing - topMargin
116 height: column.height - searchField.height - column.spacing - topMargin
118 contentHeight: contentItem.childrenRect.height
117 contentHeight: contentItem.childrenRect.height
119 clip: true
118 clip: true
@@ -132,7 +131,7 @@ LocalComponents.Page {
132 id: loader
131 id: loader
133 anchors.left: !!parent ? parent.left : undefined
132 anchors.left: !!parent ? parent.left : undefined
134 anchors.right: !!parent ? parent.right : undefined
133 anchors.right: !!parent ? parent.right : undefined
135− height: units.gu(6)
134+ height: units.gu(11)
136 asynchronous: true
135 asynchronous: true
137 sourceComponent: tzComponent
136 sourceComponent: tzComponent
@@ -154,6 +153,7 @@ LocalComponents.Page {
154 LocalComponents.StackButton {
153 LocalComponents.StackButton {
155 text: i18n.tr("Next")
154 text: i18n.tr("Next")
156 enabled: selectedTimeZone != ""
155 enabled: selectedTimeZone != ""
156+ // TODO save the timezone to system
157 onClicked: pageStack.next()
157 onClicked: pageStack.next()