Merge lp:~nik90/ubuntu-clock-app/improved-multiselectmode into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 110
Merged at revision: 108
Proposed branch: lp:~nik90/ubuntu-clock-app/improved-multiselectmode
Merge into: lp:ubuntu-clock-app
Diff against target: 405 lines (+139/-193)
5 files modified
app/alarm/AlarmPage.qml (+64/-22)
app/alarm/AlarmRepeat.qml (+9/-11)
app/components/HeaderButton.qml (+65/-0)
app/graphics/select-undefined.svg (+0/-160)
debian/changelog (+1/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/improved-multiselectmode
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Riccardo Padovani Approve
Nekhelesh Ramananthan design and testing Approve
Review via email: mp+234992@code.launchpad.net

Commit message

Improved multiselect mode behaviour and appearance.

Description of the change

Improved multiselect mode behaviour and appearance.

To post a comment you must log in.
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
106. By Nekhelesh Ramananthan

Fixed action headers

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
107. By Nekhelesh Ramananthan

Removed 3rd selection mode as requested by design

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
Nekhelesh Ramananthan (nik90) wrote :

Giorgio (Clock App Designer) has tested and approved the UI and behaviour.

review: Approve (design and testing)
108. By Nekhelesh Ramananthan

Fixed code style

109. By Nekhelesh Ramananthan

Removed unnecessary asset

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
Mihir Soni (mihirsoni) wrote :

Looks good to me , Did the code review haven't tested it yet.

Revision history for this message
Riccardo Padovani (rpadovani) wrote :

lgtm

review: Approve
110. By Nekhelesh Ramananthan

Merged trunk

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
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/alarm/AlarmPage.qml'
2--- app/alarm/AlarmPage.qml 2014-09-12 15:36:38 +0000
3+++ app/alarm/AlarmPage.qml 2014-09-19 21:03:46 +0000
4@@ -37,6 +37,7 @@
5 name: "default"
6 head: alarmPage.head
7 when: !alarmListView.isInSelectionMode
8+
9 actions: [
10 Action {
11 objectName: "addAlarmAction"
12@@ -53,32 +54,77 @@
13 name: "selection"
14 head: alarmPage.head
15 when: alarmListView.isInSelectionMode
16+
17 backAction: Action {
18- text: i18n.tr("Cancel selection")
19- iconName: "close"
20- onTriggered: {
21- alarmListView.cancelSelection()
22+ visible: false
23+ }
24+
25+ contents: Item {
26+ anchors.fill: parent ? parent : null
27+ anchors.leftMargin: units.gu(-1)
28+
29+ HeaderButton {
30+ id: backButton
31+
32+ anchors {
33+ left: parent.left
34+ verticalCenter: parent.verticalCenter
35+ }
36+
37+ iconName: "back"
38+ text: i18n.tr("Back")
39+
40+ onTriggered: {
41+ alarmListView.cancelSelection()
42+ }
43 }
44- }
45-
46- actions: [
47- Action {
48- text: i18n.tr("Select All")
49- iconName: "select"
50+
51+ HeaderButton {
52+ id: selectButton
53+
54+ anchors {
55+ right: deleteButton.left
56+ rightMargin: units.gu(1)
57+ verticalCenter: parent.verticalCenter
58+ }
59+
60+ text: {
61+ if(alarmListView.selectedItems.count === alarmListView.count) {
62+ return i18n.tr("Select None")
63+ } else {
64+ return i18n.tr("Select All")
65+ }
66+ }
67+
68+ iconSource: {
69+ if(alarmListView.selectedItems.count === alarmListView.count) {
70+ return Qt.resolvedUrl("../graphics/select-none.svg")
71+ } else {
72+ return Qt.resolvedUrl("../graphics/select.svg")
73+ }
74+ }
75+
76 onTriggered: {
77- if(alarmListView.selectedItems.count
78- === alarmListView.count) {
79+ if(alarmListView.selectedItems.count === alarmListView.count) {
80 alarmListView.clearSelection()
81- }
82- else {
83+ } else {
84 alarmListView.selectAll()
85 }
86 }
87- },
88-
89- Action {
90+ }
91+
92+ HeaderButton {
93+ id: deleteButton
94+
95+ anchors {
96+ right: parent.right
97+ verticalCenter: parent.verticalCenter
98+ }
99+
100+ iconName: "delete"
101 text: i18n.tr("Delete")
102- iconName: "delete"
103+ enabled: alarmListView.selectedItems.count !== 0
104+
105 onTriggered: {
106 var items = alarmListView.selectedItems
107
108@@ -90,10 +136,6 @@
109 alarmListView.endSelection()
110 }
111 }
112- ]
113-
114- contents: Label {
115- text: ""
116 }
117 }
118 ]
119
120=== modified file 'app/alarm/AlarmRepeat.qml'
121--- app/alarm/AlarmRepeat.qml 2014-09-04 09:58:17 +0000
122+++ app/alarm/AlarmRepeat.qml 2014-09-19 21:03:46 +0000
123@@ -35,26 +35,24 @@
124 text: i18n.tr("Select All")
125
126 iconSource: {
127- if(alarm.daysOfWeek === 0)
128+ if(alarm.daysOfWeek === 127)
129 return Qt.resolvedUrl("../graphics/select-none.svg")
130- else if(alarm.daysOfWeek === 127)
131+ else
132 return Qt.resolvedUrl("../graphics/select.svg")
133- else
134- return Qt.resolvedUrl("../graphics/select-undefined.svg")
135 }
136
137 onTriggered: {
138- if (alarm.daysOfWeek === 0) {
139+ if (alarm.daysOfWeek === 127) {
140+ for (var i=0; i<_alarmDays.count; i++) {
141+ _alarmDays.itemAt(i).isChecked = false
142+ }
143+ }
144+
145+ else {
146 for (var i=0; i<_alarmDays.count; i++) {
147 _alarmDays.itemAt(i).isChecked = true
148 }
149 }
150-
151- else {
152- for (var i=0; i<_alarmDays.count; i++) {
153- _alarmDays.itemAt(i).isChecked = false
154- }
155- }
156 }
157 }
158 ]
159
160=== added file 'app/components/HeaderButton.qml'
161--- app/components/HeaderButton.qml 1970-01-01 00:00:00 +0000
162+++ app/components/HeaderButton.qml 2014-09-19 21:03:46 +0000
163@@ -0,0 +1,65 @@
164+/*
165+ * Copyright (C) 2014 Canonical Ltd
166+ *
167+ * This file is part of Ubuntu Clock App
168+ *
169+ * Ubuntu Clock App is free software: you can redistribute it and/or modify
170+ * it under the terms of the GNU General Public License version 3 as
171+ * published by the Free Software Foundation.
172+ *
173+ * Ubuntu Clock App is distributed in the hope that it will be useful,
174+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
175+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
176+ * GNU General Public License for more details.
177+ *
178+ * You should have received a copy of the GNU General Public License
179+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
180+ */
181+
182+import QtQuick 2.3
183+import Ubuntu.Components 1.1
184+
185+AbstractButton {
186+ id: headerButton
187+
188+ property alias iconSource: _icon.source
189+ property alias iconName: _icon.name
190+ property alias text: _label.text
191+
192+ width: units.gu(6)
193+ height: parent ? parent.height : undefined
194+
195+ Rectangle {
196+ anchors.fill: parent
197+ visible: headerButton.pressed
198+ color: Theme.palette.selected.background
199+ }
200+
201+ Column {
202+ id: buttonHolder
203+
204+ width: _label.width
205+ height: childrenRect.height
206+
207+ spacing: units.gu(0.2)
208+ anchors.centerIn: parent
209+ anchors.verticalCenterOffset: units.gu(0.3)
210+
211+ Icon {
212+ id: _icon
213+ color: UbuntuColors.darkGrey
214+ width: units.gu(2.5)
215+ height: width
216+ opacity: headerButton.enabled ? 1.0 : 0.3
217+ anchors.horizontalCenter: parent.horizontalCenter
218+ }
219+
220+ Label {
221+ id: _label
222+ color: UbuntuColors.darkGrey
223+ fontSize: "xx-small"
224+ opacity: headerButton.enabled ? 1.0 : 0.3
225+ anchors.horizontalCenter: _icon.horizontalCenter
226+ }
227+ }
228+}
229
230=== removed file 'app/graphics/select-undefined.svg'
231--- app/graphics/select-undefined.svg 2014-09-04 00:00:20 +0000
232+++ app/graphics/select-undefined.svg 1970-01-01 00:00:00 +0000
233@@ -1,160 +0,0 @@
234-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
235-<!-- Created with Inkscape (http://www.inkscape.org/) -->
236-
237-<svg
238- xmlns:dc="http://purl.org/dc/elements/1.1/"
239- xmlns:cc="http://creativecommons.org/ns#"
240- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
241- xmlns:svg="http://www.w3.org/2000/svg"
242- xmlns="http://www.w3.org/2000/svg"
243- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
244- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
245- width="90"
246- height="90"
247- id="svg4874"
248- version="1.1"
249- inkscape:version="0.48+devel r"
250- viewBox="0 0 90 90.000001"
251- sodipodi:docname="select-some.svg">
252- <defs
253- id="defs4876" />
254- <sodipodi:namedview
255- id="base"
256- pagecolor="#ffffff"
257- bordercolor="#666666"
258- borderopacity="1.0"
259- inkscape:pageopacity="0.0"
260- inkscape:pageshadow="2"
261- inkscape:zoom="4.0745363"
262- inkscape:cx="15.609138"
263- inkscape:cy="44.55722"
264- inkscape:document-units="px"
265- inkscape:current-layer="g1311"
266- showgrid="true"
267- showborder="true"
268- fit-margin-top="0"
269- fit-margin-left="0"
270- fit-margin-right="0"
271- fit-margin-bottom="0"
272- inkscape:snap-bbox="true"
273- inkscape:bbox-paths="true"
274- inkscape:bbox-nodes="true"
275- inkscape:snap-bbox-edge-midpoints="true"
276- inkscape:snap-bbox-midpoints="true"
277- inkscape:object-paths="true"
278- inkscape:snap-intersection-paths="true"
279- inkscape:object-nodes="true"
280- inkscape:snap-smooth-nodes="true"
281- inkscape:snap-midpoints="true"
282- inkscape:snap-object-midpoints="true"
283- inkscape:snap-center="true"
284- showguides="true"
285- inkscape:guide-bbox="true">
286- <inkscape:grid
287- type="xygrid"
288- id="grid5451"
289- empspacing="6" />
290- <sodipodi:guide
291- orientation="1,0"
292- position="6,77"
293- id="guide4063" />
294- <sodipodi:guide
295- orientation="1,0"
296- position="3,78"
297- id="guide4065" />
298- <sodipodi:guide
299- orientation="0,1"
300- position="55,84"
301- id="guide4067" />
302- <sodipodi:guide
303- orientation="0,1"
304- position="53,87"
305- id="guide4069" />
306- <sodipodi:guide
307- orientation="0,1"
308- position="20,3"
309- id="guide4071" />
310- <sodipodi:guide
311- orientation="0,1"
312- position="20,6"
313- id="guide4073" />
314- <sodipodi:guide
315- orientation="1,0"
316- position="87,7"
317- id="guide4075" />
318- <sodipodi:guide
319- orientation="1,0"
320- position="84,7"
321- id="guide4077" />
322- <sodipodi:guide
323- orientation="0,1"
324- position="58,81"
325- id="guide4074" />
326- <sodipodi:guide
327- orientation="1,0"
328- position="9,74"
329- id="guide4076" />
330- <sodipodi:guide
331- orientation="0,1"
332- position="21,9"
333- id="guide4078" />
334- <sodipodi:guide
335- orientation="1,0"
336- position="81,4"
337- id="guide4080" />
338- </sodipodi:namedview>
339- <metadata
340- id="metadata4879">
341- <rdf:RDF>
342- <cc:Work
343- rdf:about="">
344- <dc:format>image/svg+xml</dc:format>
345- <dc:type
346- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
347- <dc:title></dc:title>
348- </cc:Work>
349- </rdf:RDF>
350- </metadata>
351- <g
352- inkscape:label="Layer 1"
353- inkscape:groupmode="layer"
354- id="layer1"
355- transform="translate(67.857146,-84.50504)">
356- <g
357- transform="matrix(0,-1,-1,0,373.50506,516.50504)"
358- id="g4845"
359- style="display:inline">
360- <g
361- transform="matrix(0,-1,-1,0,567.36222,615.36221)"
362- id="g1311"
363- inkscape:export-filename="envelope02.png"
364- inkscape:export-xdpi="90"
365- inkscape:export-ydpi="90">
366- <g
367- id="g1313"
368- transform="matrix(1.875,0,0,1.875,-366,-1657.8169)">
369- <rect
370- transform="translate(0,804.3622)"
371- y="152"
372- x="288"
373- height="48"
374- width="48"
375- id="rect1315"
376- style="opacity:0.21171169;fill:none;stroke:none" />
377- </g>
378- <path
379- style="font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#808080;fill-opacity:1;stroke:none;display:inline;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
380- d="M 21 6 C 11 6 6 5.9998033 6 17.626953 L 6 72.373047 C 6 84.000207 11 84 21 84 L 69 84 C 79 84 84 84.000207 84 72.373047 L 84 17.626953 C 84 5.9998033 79 6 69 6 L 21 6 z M 22.867188 12 L 67.132812 12 C 75.065512 12 78 11.999356 78 20.191406 L 78 69.808594 C 78 78.000644 75.065512 78 67.132812 78 L 22.867188 78 C 14.934488 78 12 78.000644 12 69.808594 L 12 20.191406 C 12 11.999356 14.934488 12 22.867188 12 z "
381- transform="translate(174,135.36222)"
382- id="path4098" />
383- <rect
384- style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
385- id="rect4153"
386- width="42"
387- height="9"
388- x="198"
389- y="175.86221" />
390- </g>
391- </g>
392- </g>
393-</svg>
394
395=== modified file 'debian/changelog'
396--- debian/changelog 2014-09-19 15:22:51 +0000
397+++ debian/changelog 2014-09-19 21:03:46 +0000
398@@ -32,6 +32,7 @@
399 * Fixed clock mode animations being too slow (LP: #1365440)
400 * Added alarm snooze settings (LP: #1354400)
401 * Fixed default alarm label not being translatable (LP: #1365012)
402+ * Improved multiselect mode behavior and appearance (LP: #1370146)
403
404 [Zsombor Egri]
405 * Fixed alarm status toggle being reverted immediately (LP: #1272337)

Subscribers

People subscribed via source and target branches