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
=== modified file 'app/alarm/AlarmSettingsPage.qml'
--- app/alarm/AlarmSettingsPage.qml 2014-08-24 12:47:50 +0000
+++ app/alarm/AlarmSettingsPage.qml 2014-09-04 19:58:40 +0000
@@ -46,34 +46,13 @@
4646
47 ListModel {47 ListModel {
48 id: durationModel48 id: durationModel
49 ListElement {49 Component.onCompleted: initialise()
50 duration: 1050
51 }51 function initialise() {
5252 durationModel.append({ "duration": 10, "text": i18n.tr("%1 minutes").arg(10) })
53 ListElement {53 durationModel.append({ "duration": 20, "text": i18n.tr("%1 minutes").arg(20) })
54 duration: 2054 durationModel.append({ "duration": 30, "text": i18n.tr("%1 minutes").arg(30) })
55 }55 durationModel.append({ "duration": 60, "text": i18n.tr("%1 minutes").arg(60) })
56
57 ListElement {
58 duration: 30
59 }
60
61 ListElement {
62 duration: 60
63 }
64
65 function title(index) {
66 if (title["text"] === undefined) {
67 // TRANSLATORS: this refers to either 10, 20, 30 or 60 minutes
68 title.text =
69 [
70 i18n.tr("%1 minutes").arg(10),
71 i18n.tr("%1 minutes").arg(20),
72 i18n.tr("%1 minutes").arg(30),
73 i18n.tr("%1 minutes").arg(60)
74 ]
75 }
76 return title.text[index]
77 }56 }
78 }57 }
7958
@@ -83,29 +62,25 @@
83 anchors.fill: parent62 anchors.fill: parent
8463
85 ListItem.Base {64 ListItem.Base {
86 Column {65 height: 2 * implicitHeight
66
67 Label {
68 color: UbuntuColors.midAubergine
69 text: i18n.tr("Alarm volume")
70 anchors.top: parent.top
71 anchors.topMargin: units.gu(1)
72 }
73
74 Slider {
75 anchors.centerIn: parent
87 width: parent.width76 width: parent.width
88 height: childrenRect.height77
89 anchors.verticalCenter: parent.verticalCenter78 minimumValue: 1
9079 maximumValue: 100
91 Label {80 value: alarmSettings.volume
92 color: UbuntuColors.midAubergine81
93 text: i18n.tr("Alarm volume")82 onValueChanged: {
94 }83 alarmSettings.volume = formatValue(value)
95
96 Slider {
97 id: _volumeSlider
98
99 height: units.gu(2)
100 width: parent.width
101
102 minimumValue: 1
103 maximumValue: 100
104 value: alarmSettings.volume
105
106 onValueChanged: {
107 alarmSettings.volume = formatValue(value)
108 }
109 }84 }
110 }85 }
111 }86 }
@@ -162,7 +137,7 @@
162 width: parent.width137 width: parent.width
163 height: units.gu(24)138 height: units.gu(24)
164 delegate: ListItem.Standard {139 delegate: ListItem.Standard {
165 text: _resultsList.model.title(index)140 text: model.text
166 onClicked: {141 onClicked: {
167 alarmSettings.duration = duration142 alarmSettings.duration = duration
168 _alarmDuration.expanded = false143 _alarmDuration.expanded = false
@@ -220,7 +195,7 @@
220 localTimeSource.localTimeString.split(":")[1],195 localTimeSource.localTimeString.split(":")[1],
221 localTimeSource.localTimeString.split(":")[2],196 localTimeSource.localTimeString.split(":")[2],
222 localTimeSource.localTimeString.split(":")[3]197 localTimeSource.localTimeString.split(":")[3]
223 )198 )
224 return localTime.toLocaleString()199 return localTime.toLocaleString()
225 }200 }
226201
227202
=== modified file 'debian/changelog'
--- debian/changelog 2014-09-04 16:24:24 +0000
+++ debian/changelog 2014-09-04 19:58:40 +0000
@@ -23,6 +23,7 @@
23 next alarm when enabling an alarm.23 next alarm when enabling an alarm.
24 * Enabled one-time alarms in the UI (LP: #1358320)24 * Enabled one-time alarms in the UI (LP: #1358320)
25 * Fixed the transition animation to alarms to be more smoother (LP: #1362081)25 * Fixed the transition animation to alarms to be more smoother (LP: #1362081)
26 * Increase size of alarm volume listitem and simplified alarm duration list model.
26 * Added pressed visual state to the settings button (LP: #1364553)27 * Added pressed visual state to the settings button (LP: #1364553)
2728
28 [Zsombor Egri]29 [Zsombor Egri]

Subscribers

People subscribed via source and target branches