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
=== modified file 'app/alarm/AlarmSettingsPage.qml'
--- app/alarm/AlarmSettingsPage.qml 2015-07-15 22:31:52 +0000
+++ app/alarm/AlarmSettingsPage.qml 2015-07-24 13:27:40 +0000
@@ -17,10 +17,10 @@
17 */17 */
1818
19import QtQuick 2.419import QtQuick 2.4
20import QtQuick.Layouts 1.1
20import DateTime 1.021import DateTime 1.0
21import Alarm.Settings 1.022import Alarm.Settings 1.0
22import Ubuntu.Components 1.223import Ubuntu.Components 1.2
23import Ubuntu.Components.ListItems 1.0 as ListItem
24import "../components"24import "../components"
2525
26Page {26Page {
@@ -86,7 +86,7 @@
86 right: parent.right86 right: parent.right
87 }87 }
8888
89 ListItem.Empty {89 ListItem {
90 height: 2 * implicitHeight90 height: 2 * implicitHeight
9191
92 Label {92 Label {
@@ -121,60 +121,80 @@
121 ExpandableListItem {121 ExpandableListItem {
122 id: _alarmDuration122 id: _alarmDuration
123123
124 listViewHeight: units.gu(24)124 listViewHeight: units.gu(28)
125 text: i18n.tr("Silence after")125 text: i18n.tr("Silence after")
126 subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.duration).arg(alarmSettings.duration)126 subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.duration).arg(alarmSettings.duration)
127127
128 model: durationModel128 model: durationModel
129129
130 delegate: ListItem.Standard {130 delegate: ListItem {
131 text: model.text131 RowLayout {
132 anchors {
133 left: parent.left
134 right: parent.right
135 margins: units.gu(2)
136 verticalCenter: parent.verticalCenter
137 }
138
139 Label {
140 text: model.text
141 Layout.fillWidth: true
142 }
143
144 Icon {
145 width: units.gu(2)
146 height: width
147 name: "ok"
148 visible: alarmSettings.duration === duration
149 }
150 }
151
132 onClicked: {152 onClicked: {
133 alarmSettings.duration = duration153 alarmSettings.duration = duration
134 _alarmDuration.expanded = false154 _alarmDuration.expanded = false
135 }155 }
136
137 Icon {
138 width: units.gu(2)
139 height: width
140 name: "ok"
141 visible: alarmSettings.duration === duration
142 anchors.right: parent.right
143 anchors.rightMargin: units.gu(2)
144 anchors.verticalCenter: parent.verticalCenter
145 }
146 }156 }
147 }157 }
148158
149 ExpandableListItem {159 ExpandableListItem {
150 id: _alarmSnooze160 id: _alarmSnooze
151161
152 listViewHeight: units.gu(24)162 listViewHeight: units.gu(28)
153 text: i18n.tr("Snooze for")163 text: i18n.tr("Snooze for")
154 subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.snoozeDuration).arg(alarmSettings.snoozeDuration)164 subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.snoozeDuration).arg(alarmSettings.snoozeDuration)
155165
156 model: snoozeModel166 model: snoozeModel
157167
158 delegate: ListItem.Standard {168 delegate: ListItem {
159 text: model.text169 RowLayout {
170 anchors {
171 left: parent.left
172 right: parent.right
173 margins: units.gu(2)
174 verticalCenter: parent.verticalCenter
175 }
176
177 Label {
178 text: model.text
179 Layout.fillWidth: true
180 }
181
182 Icon {
183 width: units.gu(2)
184 height: width
185 name: "ok"
186 visible: alarmSettings.snoozeDuration === duration
187 }
188 }
189
160 onClicked: {190 onClicked: {
161 alarmSettings.snoozeDuration = duration191 alarmSettings.snoozeDuration = duration
162 _alarmSnooze.expanded = false192 _alarmSnooze.expanded = false
163 }193 }
164
165 Icon {
166 width: units.gu(2)
167 height: width
168 name: "ok"
169 visible: alarmSettings.snoozeDuration === duration
170 anchors.right: parent.right
171 anchors.rightMargin: units.gu(2)
172 anchors.verticalCenter: parent.verticalCenter
173 }
174 }194 }
175 }195 }
176196
177 ListItem.Empty {197 ListItem {
178 Label {198 Label {
179 text: i18n.tr("Vibration")199 text: i18n.tr("Vibration")
180 color: UbuntuColors.midAubergine200 color: UbuntuColors.midAubergine
181201
=== modified file 'app/components/ExpandableListItem.qml'
--- app/components/ExpandableListItem.qml 2015-05-27 16:03:23 +0000
+++ app/components/ExpandableListItem.qml 2015-07-24 13:27:40 +0000
@@ -43,7 +43,7 @@
43 }43 }
4444
45 collapseOnClick: true45 collapseOnClick: true
46 expandedHeight: contentColumn.height + units.gu(1)46 expandedHeight: contentColumn.height
4747
48 Column {48 Column {
49 id: contentColumn49 id: contentColumn
@@ -53,30 +53,26 @@
53 right: parent.right53 right: parent.right
54 }54 }
5555
56 Item {56 SubtitledListItem {
57 width: parent.width57 id: expandableHeader
58 height: expandableListItem.collapsedHeight58 height: expandableListItem.collapsedHeight
5959 onClicked: expandableListItem.expanded = true
60 SubtitledListItem {60
61 id: expandableHeader61 Icon {
62 onClicked: expandableListItem.expanded = true62 id: arrow
6363
64 Icon {64 width: units.gu(2)
65 id: arrow65 height: width
6666 anchors.right: parent.right
67 width: units.gu(2)67 anchors.rightMargin: units.gu(2)
68 height: width68 anchors.verticalCenter: parent.verticalCenter
69 anchors.right: parent.right69
70 anchors.rightMargin: units.gu(2)70 name: "go-down"
71 anchors.verticalCenter: parent.verticalCenter71 color: "Grey"
7272 rotation: expandableListItem.expanded ? 180 : 0
73 name: "go-down"73
74 color: "Grey"74 Behavior on rotation {
75 rotation: expandableListItem.expanded ? 180 : 075 UbuntuNumberAnimation {}
76
77 Behavior on rotation {
78 UbuntuNumberAnimation {}
79 }
80 }76 }
81 }77 }
82 }78 }
8379
=== modified file 'app/components/SubtitledListItem.qml'
--- app/components/SubtitledListItem.qml 2015-05-27 16:03:23 +0000
+++ app/components/SubtitledListItem.qml 2015-07-24 13:27:40 +0000
@@ -18,7 +18,6 @@
1818
19import QtQuick 2.419import QtQuick 2.4
20import Ubuntu.Components 1.220import Ubuntu.Components 1.2
21import Ubuntu.Components.ListItems 1.0 as ListItem
2221
23/*22/*
24 This component is almost an identical copy of the SDK's subtitled with the23 This component is almost an identical copy of the SDK's subtitled with the
@@ -27,7 +26,7 @@
27 #TODO: Revert to using the SDK Subtitled Component when they change the26 #TODO: Revert to using the SDK Subtitled Component when they change the
28 design to match the new clock app design.27 design to match the new clock app design.
29 */28 */
30ListItem.Empty {29ListItem {
31 id: _subtitledContainer30 id: _subtitledContainer
3231
33 // Property to set the main text label32 // Property to set the main text label
3433
=== modified file 'po/com.ubuntu.clock.pot'
--- po/com.ubuntu.clock.pot 2015-07-15 23:50:07 +0000
+++ po/com.ubuntu.clock.pot 2015-07-24 13:27:40 +0000
@@ -33,7 +33,7 @@
33msgstr ""33msgstr ""
3434
35#: ../app/alarm/AlarmPage.qml:41 ../app/alarm/AlarmPage.qml:6635#: ../app/alarm/AlarmPage.qml:41 ../app/alarm/AlarmPage.qml:66
36#: ../app/worldclock/WorldCityList.qml:8036#: ../app/worldclock/WorldCityList.qml:79
37msgid "Back"37msgid "Back"
38msgstr ""38msgstr ""
3939
@@ -169,7 +169,7 @@
169msgstr ""169msgstr ""
170170
171#: ../app/worldclock/AddWorldCityButton.qml:61171#: ../app/worldclock/AddWorldCityButton.qml:61
172#: ../app/worldclock/WorldCityList.qml:64172#: ../app/worldclock/WorldCityList.qml:63
173msgid "City"173msgid "City"
174msgstr ""174msgstr ""
175175
@@ -209,27 +209,27 @@
209msgid "Same time"209msgid "Same time"
210msgstr ""210msgstr ""
211211
212#: ../app/worldclock/WorldCityList.qml:51212#: ../app/worldclock/WorldCityList.qml:50
213msgid "Select a city"213msgid "Select a city"
214msgstr ""214msgstr ""
215215
216#: ../app/worldclock/WorldCityList.qml:109216#: ../app/worldclock/WorldCityList.qml:108
217msgid "Search..."217msgid "Search..."
218msgstr ""218msgstr ""
219219
220#: ../app/worldclock/WorldCityList.qml:213220#: ../app/worldclock/WorldCityList.qml:212
221msgid "Searching for a city"221msgid "Searching for a city"
222msgstr ""222msgstr ""
223223
224#: ../app/worldclock/WorldCityList.qml:218224#: ../app/worldclock/WorldCityList.qml:217
225msgid "No City Found"225msgid "No City Found"
226msgstr ""226msgstr ""
227227
228#: ../app/worldclock/WorldCityList.qml:223
229msgid "Unable to connect."
230msgstr ""
231
228#: ../app/worldclock/WorldCityList.qml:224232#: ../app/worldclock/WorldCityList.qml:224
229msgid "Unable to connect."
230msgstr ""
231
232#: ../app/worldclock/WorldCityList.qml:225
233msgid "Please check your network connection and try again"233msgid "Please check your network connection and try again"
234msgstr ""234msgstr ""
235235

Subscribers

People subscribed via source and target branches

to all changes: