Merge lp:~nik90/ubuntu-clock-app/fix-jarring-alarm-header into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 82
Merged at revision: 75
Proposed branch: lp:~nik90/ubuntu-clock-app/fix-jarring-alarm-header
Merge into: lp:ubuntu-clock-app
Diff against target: 165 lines (+89/-10)
3 files modified
app/upstreamcomponents/FakeHeader.qml (+39/-0)
app/upstreamcomponents/PageWithBottomEdge.qml (+49/-10)
debian/changelog (+1/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/fix-jarring-alarm-header
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
Riccardo Padovani Approve
Review via email: mp+232913@code.launchpad.net

Commit message

Fix the alarm head animation being jarring by introducing a nice slide in animation.

Description of the change

Fix the alarm head animation being jarring by introducing a nice slide in animation.

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)
78. By Nekhelesh Ramananthan

Replaced fake header background

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

Added license header and simplified fake header

80. By Nekhelesh Ramananthan

Reverted manifest file change

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

68 + y: ((-fakeHeader.height * bottomEdge.y) / page.height) + units.gu(1.1)

Deal with it, it's a magic number!

Lgtm

review: Approve
81. By Nekhelesh Ramananthan

Removed hack thanks to riccardo

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

Reapproved, hack removed as discussed on IRC :-)

82. By Nekhelesh Ramananthan

Updated changelog

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: Needs Fixing (continuous-integration)
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: Needs Fixing (continuous-integration)
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
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=== added file 'app/upstreamcomponents/FakeHeader.qml'
2--- app/upstreamcomponents/FakeHeader.qml 1970-01-01 00:00:00 +0000
3+++ app/upstreamcomponents/FakeHeader.qml 2014-09-02 17:14:49 +0000
4@@ -0,0 +1,39 @@
5+/*
6+ * Copyright (C) 2014 Canonical Ltd
7+ *
8+ * This file is part of Ubuntu Clock App
9+ *
10+ * Ubuntu Clock App is free software: you can redistribute it and/or modify
11+ * it under the terms of the GNU General Public License version 3 as
12+ * published by the Free Software Foundation.
13+ *
14+ * Ubuntu Clock App is distributed in the hope that it will be useful,
15+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+ * GNU General Public License for more details.
18+ *
19+ * You should have received a copy of the GNU General Public License
20+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21+ */
22+
23+import QtQuick 2.3
24+import Ubuntu.Components 1.1
25+
26+Column {
27+ id: fakeHeader
28+
29+ height: units.gu(9)
30+
31+ Rectangle {
32+ height: units.gu(7)
33+ width: parent.width
34+ color: Theme.palette.normal.background
35+ }
36+
37+ Rectangle {
38+ color: "#C9C9C9"
39+ height: units.gu(2)
40+ anchors.left: parent.left
41+ anchors.right: parent.right
42+ }
43+}
44
45=== modified file 'app/upstreamcomponents/PageWithBottomEdge.qml'
46--- app/upstreamcomponents/PageWithBottomEdge.qml 2014-08-07 00:05:45 +0000
47+++ app/upstreamcomponents/PageWithBottomEdge.qml 2014-09-02 17:14:49 +0000
48@@ -77,7 +77,7 @@
49 property bool reloadBottomEdgePage: true
50
51 readonly property alias bottomEdgePage: edgeLoader.item
52- readonly property bool isReady: ((bottomEdge.y === 0) && bottomEdgePageLoaded && edgeLoader.item.active)
53+ readonly property bool isReady: ((bottomEdge.y === fakeHeader.height) && bottomEdgePageLoaded && edgeLoader.item.active)
54 readonly property bool isCollapsed: (bottomEdge.y === page.height)
55 readonly property bool bottomEdgePageLoaded: (edgeLoader.status == Loader.Ready)
56
57@@ -151,12 +151,29 @@
58 onTriggered: tip.hiden = true
59 }
60
61+ FakeHeader {
62+ id: fakeHeader
63+
64+ anchors {
65+ left: parent.left
66+ right: parent.right
67+ }
68+ y: -fakeHeader.height + (fakeHeader.height * (page.height - bottomEdge.y)) / (page.height - fakeHeader.height)
69+ z: bgVisual.z + 1
70+
71+ Behavior on y {
72+ UbuntuNumberAnimation {
73+ duration: UbuntuAnimation.SnapDuration
74+ }
75+ }
76+ }
77+
78 Rectangle {
79 id: bottomEdge
80 objectName: "bottomEdge"
81
82 readonly property int tipHeight: units.gu(3)
83- readonly property int pageStartY: 0
84+ readonly property int pageStartY: fakeHeader.height
85
86 z: 1
87 color: Theme.palette.normal.background
88@@ -270,6 +287,10 @@
89 y: bottomEdge.height
90 }
91 PropertyChanges {
92+ target: fakeHeader
93+ y: -fakeHeader.height
94+ }
95+ PropertyChanges {
96 target: tip
97 opacity: 1.0
98 }
99@@ -285,6 +306,10 @@
100 y: bottomEdge.pageStartY
101 }
102 PropertyChanges {
103+ target: fakeHeader
104+ y: 0
105+ }
106+ PropertyChanges {
107 target: hideIndicator
108 running: false
109 }
110@@ -311,10 +336,17 @@
111 Transition {
112 to: "expanded"
113 SequentialAnimation {
114- UbuntuNumberAnimation {
115- target: bottomEdge
116- property: "y"
117- duration: UbuntuAnimation.SlowDuration
118+ ParallelAnimation {
119+ UbuntuNumberAnimation {
120+ target: bottomEdge
121+ property: "y"
122+ duration: UbuntuAnimation.SlowDuration
123+ }
124+ UbuntuNumberAnimation {
125+ target: fakeHeader
126+ property: "y"
127+ duration: UbuntuAnimation.SlowDuration
128+ }
129 }
130 ScriptAction {
131 script: page._pushPage()
132@@ -333,10 +365,17 @@
133 edgeLoader.item.active = false
134 }
135 }
136- UbuntuNumberAnimation {
137- target: bottomEdge
138- property: "y"
139- duration: UbuntuAnimation.SlowDuration
140+ ParallelAnimation {
141+ UbuntuNumberAnimation {
142+ target: bottomEdge
143+ property: "y"
144+ duration: UbuntuAnimation.SlowDuration
145+ }
146+ UbuntuNumberAnimation {
147+ target: fakeHeader
148+ property: "y"
149+ duration: UbuntuAnimation.SlowDuration
150+ }
151 }
152 ScriptAction {
153 script: {
154
155=== modified file 'debian/changelog'
156--- debian/changelog 2014-08-26 14:07:50 +0000
157+++ debian/changelog 2014-09-02 17:14:49 +0000
158@@ -19,6 +19,7 @@
159 * Updated QtQuick library imports to v2.3
160 * Switched bzr branch to lp:ubuntu-clock-app
161 * Updated pot file name
162+ * Fixed the transition animation to alarms to be more smoother (LP: #1362081)
163
164 [Zsombor Egri]
165 * Fixed alarm status toggle being reverted immediately (LP: #1272337)

Subscribers

People subscribed via source and target branches