Merge lp:~ubuntu-clock-dev/ubuntu-clock-app/3-migrate-settings-page-listitems into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Bartosz Kosiorek
Approved revision: 274
Merged at revision: 310
Proposed branch: lp:~ubuntu-clock-dev/ubuntu-clock-app/3-migrate-settings-page-listitems
Merge into: lp:ubuntu-clock-app
Prerequisite: lp:~ubuntu-clock-dev/ubuntu-clock-app/2-migrate-add-city-listitems
Diff against target: 273 lines (+80/-65)
4 files modified
app/alarm/AlarmSettingsPage.qml (+49/-29)
app/components/ExpandableListItem.qml (+20/-24)
app/components/SubtitledListItem.qml (+1/-2)
po/com.ubuntu.clock.pot (+10/-10)
To merge this branch: bzr merge lp:~ubuntu-clock-dev/ubuntu-clock-app/3-migrate-settings-page-listitems
Reviewer Review Type Date Requested Status
Bartosz Kosiorek Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+263888@code.launchpad.net

Commit message

Migrated settings page listitems to the new 15.04 list items

Description of the change

This MP implements the following,
- Migrate SubtitledListItem, Settings Page listitems to the new 15.04 ones

Note: No Visual Change

#blocked

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/alarm/AlarmSettingsPage.qml'
2--- app/alarm/AlarmSettingsPage.qml 2015-07-15 22:31:52 +0000
3+++ app/alarm/AlarmSettingsPage.qml 2015-07-24 13:27:40 +0000
4@@ -17,10 +17,10 @@
5 */
6
7 import QtQuick 2.4
8+import QtQuick.Layouts 1.1
9 import DateTime 1.0
10 import Alarm.Settings 1.0
11 import Ubuntu.Components 1.2
12-import Ubuntu.Components.ListItems 1.0 as ListItem
13 import "../components"
14
15 Page {
16@@ -86,7 +86,7 @@
17 right: parent.right
18 }
19
20- ListItem.Empty {
21+ ListItem {
22 height: 2 * implicitHeight
23
24 Label {
25@@ -121,60 +121,80 @@
26 ExpandableListItem {
27 id: _alarmDuration
28
29- listViewHeight: units.gu(24)
30+ listViewHeight: units.gu(28)
31 text: i18n.tr("Silence after")
32 subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.duration).arg(alarmSettings.duration)
33
34 model: durationModel
35
36- delegate: ListItem.Standard {
37- text: model.text
38+ delegate: ListItem {
39+ RowLayout {
40+ anchors {
41+ left: parent.left
42+ right: parent.right
43+ margins: units.gu(2)
44+ verticalCenter: parent.verticalCenter
45+ }
46+
47+ Label {
48+ text: model.text
49+ Layout.fillWidth: true
50+ }
51+
52+ Icon {
53+ width: units.gu(2)
54+ height: width
55+ name: "ok"
56+ visible: alarmSettings.duration === duration
57+ }
58+ }
59+
60 onClicked: {
61 alarmSettings.duration = duration
62 _alarmDuration.expanded = false
63 }
64-
65- Icon {
66- width: units.gu(2)
67- height: width
68- name: "ok"
69- visible: alarmSettings.duration === duration
70- anchors.right: parent.right
71- anchors.rightMargin: units.gu(2)
72- anchors.verticalCenter: parent.verticalCenter
73- }
74 }
75 }
76
77 ExpandableListItem {
78 id: _alarmSnooze
79
80- listViewHeight: units.gu(24)
81+ listViewHeight: units.gu(28)
82 text: i18n.tr("Snooze for")
83 subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.snoozeDuration).arg(alarmSettings.snoozeDuration)
84
85 model: snoozeModel
86
87- delegate: ListItem.Standard {
88- text: model.text
89+ delegate: ListItem {
90+ RowLayout {
91+ anchors {
92+ left: parent.left
93+ right: parent.right
94+ margins: units.gu(2)
95+ verticalCenter: parent.verticalCenter
96+ }
97+
98+ Label {
99+ text: model.text
100+ Layout.fillWidth: true
101+ }
102+
103+ Icon {
104+ width: units.gu(2)
105+ height: width
106+ name: "ok"
107+ visible: alarmSettings.snoozeDuration === duration
108+ }
109+ }
110+
111 onClicked: {
112 alarmSettings.snoozeDuration = duration
113 _alarmSnooze.expanded = false
114 }
115-
116- Icon {
117- width: units.gu(2)
118- height: width
119- name: "ok"
120- visible: alarmSettings.snoozeDuration === duration
121- anchors.right: parent.right
122- anchors.rightMargin: units.gu(2)
123- anchors.verticalCenter: parent.verticalCenter
124- }
125 }
126 }
127
128- ListItem.Empty {
129+ ListItem {
130 Label {
131 text: i18n.tr("Vibration")
132 color: UbuntuColors.midAubergine
133
134=== modified file 'app/components/ExpandableListItem.qml'
135--- app/components/ExpandableListItem.qml 2015-05-27 16:03:23 +0000
136+++ app/components/ExpandableListItem.qml 2015-07-24 13:27:40 +0000
137@@ -43,7 +43,7 @@
138 }
139
140 collapseOnClick: true
141- expandedHeight: contentColumn.height + units.gu(1)
142+ expandedHeight: contentColumn.height
143
144 Column {
145 id: contentColumn
146@@ -53,30 +53,26 @@
147 right: parent.right
148 }
149
150- Item {
151- width: parent.width
152+ SubtitledListItem {
153+ id: expandableHeader
154 height: expandableListItem.collapsedHeight
155-
156- SubtitledListItem {
157- id: expandableHeader
158- onClicked: expandableListItem.expanded = true
159-
160- Icon {
161- id: arrow
162-
163- width: units.gu(2)
164- height: width
165- anchors.right: parent.right
166- anchors.rightMargin: units.gu(2)
167- anchors.verticalCenter: parent.verticalCenter
168-
169- name: "go-down"
170- color: "Grey"
171- rotation: expandableListItem.expanded ? 180 : 0
172-
173- Behavior on rotation {
174- UbuntuNumberAnimation {}
175- }
176+ onClicked: expandableListItem.expanded = true
177+
178+ Icon {
179+ id: arrow
180+
181+ width: units.gu(2)
182+ height: width
183+ anchors.right: parent.right
184+ anchors.rightMargin: units.gu(2)
185+ anchors.verticalCenter: parent.verticalCenter
186+
187+ name: "go-down"
188+ color: "Grey"
189+ rotation: expandableListItem.expanded ? 180 : 0
190+
191+ Behavior on rotation {
192+ UbuntuNumberAnimation {}
193 }
194 }
195 }
196
197=== modified file 'app/components/SubtitledListItem.qml'
198--- app/components/SubtitledListItem.qml 2015-05-27 16:03:23 +0000
199+++ app/components/SubtitledListItem.qml 2015-07-24 13:27:40 +0000
200@@ -18,7 +18,6 @@
201
202 import QtQuick 2.4
203 import Ubuntu.Components 1.2
204-import Ubuntu.Components.ListItems 1.0 as ListItem
205
206 /*
207 This component is almost an identical copy of the SDK's subtitled with the
208@@ -27,7 +26,7 @@
209 #TODO: Revert to using the SDK Subtitled Component when they change the
210 design to match the new clock app design.
211 */
212-ListItem.Empty {
213+ListItem {
214 id: _subtitledContainer
215
216 // Property to set the main text label
217
218=== modified file 'po/com.ubuntu.clock.pot'
219--- po/com.ubuntu.clock.pot 2015-07-15 23:50:07 +0000
220+++ po/com.ubuntu.clock.pot 2015-07-24 13:27:40 +0000
221@@ -33,7 +33,7 @@
222 msgstr ""
223
224 #: ../app/alarm/AlarmPage.qml:41 ../app/alarm/AlarmPage.qml:66
225-#: ../app/worldclock/WorldCityList.qml:80
226+#: ../app/worldclock/WorldCityList.qml:79
227 msgid "Back"
228 msgstr ""
229
230@@ -169,7 +169,7 @@
231 msgstr ""
232
233 #: ../app/worldclock/AddWorldCityButton.qml:61
234-#: ../app/worldclock/WorldCityList.qml:64
235+#: ../app/worldclock/WorldCityList.qml:63
236 msgid "City"
237 msgstr ""
238
239@@ -209,27 +209,27 @@
240 msgid "Same time"
241 msgstr ""
242
243-#: ../app/worldclock/WorldCityList.qml:51
244+#: ../app/worldclock/WorldCityList.qml:50
245 msgid "Select a city"
246 msgstr ""
247
248-#: ../app/worldclock/WorldCityList.qml:109
249+#: ../app/worldclock/WorldCityList.qml:108
250 msgid "Search..."
251 msgstr ""
252
253-#: ../app/worldclock/WorldCityList.qml:213
254+#: ../app/worldclock/WorldCityList.qml:212
255 msgid "Searching for a city"
256 msgstr ""
257
258-#: ../app/worldclock/WorldCityList.qml:218
259+#: ../app/worldclock/WorldCityList.qml:217
260 msgid "No City Found"
261 msgstr ""
262
263+#: ../app/worldclock/WorldCityList.qml:223
264+msgid "Unable to connect."
265+msgstr ""
266+
267 #: ../app/worldclock/WorldCityList.qml:224
268-msgid "Unable to connect."
269-msgstr ""
270-
271-#: ../app/worldclock/WorldCityList.qml:225
272 msgid "Please check your network connection and try again"
273 msgstr ""
274

Subscribers

People subscribed via source and target branches

to all changes: