Merge lp:~nik90/ubuntu-clock-app/fix-volume-slider into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 81
Merged at revision: 79
Proposed branch: lp:~nik90/ubuntu-clock-app/fix-volume-slider
Merge into: lp:ubuntu-clock-app
Diff against target: 123 lines (+28/-52)
2 files modified
app/alarm/AlarmSettingsPage.qml (+27/-52)
debian/changelog (+1/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/fix-volume-slider
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Riccardo Padovani Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+233359@code.launchpad.net

Commit message

Increased the size of the alarm volume slider listitem in the settings page and simplified the alarm duration listmodel.

Description of the change

Increased the size of the alarm volume slider listitem in the settings page and simplified the alarm duration listmodel.

To post a comment you must log in.
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Approved by design. Just requires a code sign off.

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
Riccardo Padovani (rpadovani) wrote :

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
81. By Nekhelesh Ramananthan

Fixed debian changelog conflict

Revision history for this message
PS Jenkins bot (ps-jenkins) :
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/AlarmSettingsPage.qml'
2--- app/alarm/AlarmSettingsPage.qml 2014-08-24 12:47:50 +0000
3+++ app/alarm/AlarmSettingsPage.qml 2014-09-04 19:58:40 +0000
4@@ -46,34 +46,13 @@
5
6 ListModel {
7 id: durationModel
8- ListElement {
9- duration: 10
10- }
11-
12- ListElement {
13- duration: 20
14- }
15-
16- ListElement {
17- duration: 30
18- }
19-
20- ListElement {
21- duration: 60
22- }
23-
24- function title(index) {
25- if (title["text"] === undefined) {
26- // TRANSLATORS: this refers to either 10, 20, 30 or 60 minutes
27- title.text =
28- [
29- i18n.tr("%1 minutes").arg(10),
30- i18n.tr("%1 minutes").arg(20),
31- i18n.tr("%1 minutes").arg(30),
32- i18n.tr("%1 minutes").arg(60)
33- ]
34- }
35- return title.text[index]
36+ Component.onCompleted: initialise()
37+
38+ function initialise() {
39+ durationModel.append({ "duration": 10, "text": i18n.tr("%1 minutes").arg(10) })
40+ durationModel.append({ "duration": 20, "text": i18n.tr("%1 minutes").arg(20) })
41+ durationModel.append({ "duration": 30, "text": i18n.tr("%1 minutes").arg(30) })
42+ durationModel.append({ "duration": 60, "text": i18n.tr("%1 minutes").arg(60) })
43 }
44 }
45
46@@ -83,29 +62,25 @@
47 anchors.fill: parent
48
49 ListItem.Base {
50- Column {
51+ height: 2 * implicitHeight
52+
53+ Label {
54+ color: UbuntuColors.midAubergine
55+ text: i18n.tr("Alarm volume")
56+ anchors.top: parent.top
57+ anchors.topMargin: units.gu(1)
58+ }
59+
60+ Slider {
61+ anchors.centerIn: parent
62 width: parent.width
63- height: childrenRect.height
64- anchors.verticalCenter: parent.verticalCenter
65-
66- Label {
67- color: UbuntuColors.midAubergine
68- text: i18n.tr("Alarm volume")
69- }
70-
71- Slider {
72- id: _volumeSlider
73-
74- height: units.gu(2)
75- width: parent.width
76-
77- minimumValue: 1
78- maximumValue: 100
79- value: alarmSettings.volume
80-
81- onValueChanged: {
82- alarmSettings.volume = formatValue(value)
83- }
84+
85+ minimumValue: 1
86+ maximumValue: 100
87+ value: alarmSettings.volume
88+
89+ onValueChanged: {
90+ alarmSettings.volume = formatValue(value)
91 }
92 }
93 }
94@@ -162,7 +137,7 @@
95 width: parent.width
96 height: units.gu(24)
97 delegate: ListItem.Standard {
98- text: _resultsList.model.title(index)
99+ text: model.text
100 onClicked: {
101 alarmSettings.duration = duration
102 _alarmDuration.expanded = false
103@@ -220,7 +195,7 @@
104 localTimeSource.localTimeString.split(":")[1],
105 localTimeSource.localTimeString.split(":")[2],
106 localTimeSource.localTimeString.split(":")[3]
107- )
108+ )
109 return localTime.toLocaleString()
110 }
111
112
113=== modified file 'debian/changelog'
114--- debian/changelog 2014-09-04 16:24:24 +0000
115+++ debian/changelog 2014-09-04 19:58:40 +0000
116@@ -23,6 +23,7 @@
117 next alarm when enabling an alarm.
118 * Enabled one-time alarms in the UI (LP: #1358320)
119 * Fixed the transition animation to alarms to be more smoother (LP: #1362081)
120+ * Increase size of alarm volume listitem and simplified alarm duration list model.
121 * Added pressed visual state to the settings button (LP: #1364553)
122
123 [Zsombor Egri]

Subscribers

People subscribed via source and target branches