Merge lp:~nik90/ubuntu-clock-app/stopwatch-add-blips into lp:ubuntu-clock-app/saucy

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 28
Merged at revision: 28
Proposed branch: lp:~nik90/ubuntu-clock-app/stopwatch-add-blips
Merge into: lp:ubuntu-clock-app/saucy
Diff against target: 65 lines (+43/-0)
2 files modified
stopwatch/Blip.qml (+37/-0)
stopwatch/StopwatchPage.qml (+6/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/stopwatch-add-blips
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Clock Developers Pending
Review via email: mp+158675@code.launchpad.net

Commit message

Add blips to stopwatch

Description of the change

This MP adds blip support to the stopwatch page. For more information refer to screenshot at http://design.canonical.com/wp-content/uploads/clock_recording_laps.png

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'stopwatch/Blip.qml'
2--- stopwatch/Blip.qml 1970-01-01 00:00:00 +0000
3+++ stopwatch/Blip.qml 2013-04-12 16:39:24 +0000
4@@ -0,0 +1,37 @@
5+import QtQuick 2.0
6+import Ubuntu.Components 0.1
7+import "../common/Constants.js" as Constants
8+
9+Rectangle {
10+ id: stopwatchBlip
11+
12+ property int number: 0
13+ property real radAngle: ((number % 60 * -6) * Math.PI / 180) - Math.PI
14+ property real distance: 0.50
15+ property real size: 2
16+
17+ z: parent.z - 1
18+ width: units.gu(size); height: units.gu(size)
19+ radius: width / 2
20+ anchors.centerIn: parent
21+ color: Constants.ubuntuOrange
22+ antialiasing: true
23+ visible: false
24+
25+ // Position the blip at the correct position
26+ transform: Translate {
27+ x: parent.width * distance * Math.sin(radAngle)
28+ y: parent.height * distance * Math.cos(radAngle)
29+ }
30+
31+ // Increase the radius and decrease the opacity gradually
32+ Behavior on number {
33+ ParallelAnimation {
34+ running: false
35+ NumberAnimation { target: stopwatchBlip; property: "size"; from: 1; to: 7; duration: 3500; easing.type: Easing.OutQuad}
36+ NumberAnimation { target: stopwatchBlip; property: "opacity"; from: 1; to: 0; duration: 3500; easing.type: Easing.OutQuad}
37+ }
38+ }
39+
40+}
41+
42
43=== modified file 'stopwatch/StopwatchPage.qml'
44--- stopwatch/StopwatchPage.qml 2013-04-12 12:19:07 +0000
45+++ stopwatch/StopwatchPage.qml 2013-04-12 16:39:24 +0000
46@@ -69,6 +69,10 @@
47 AnalogFaceBase {
48 id: clockOuterCircle
49
50+ Blip {
51+ id: blipFist
52+ }
53+
54 HandGradient {
55 id: gradientSecond
56 rotationAngle: parseInt(stopwatchPage.secondHandValue) * perRadius
57@@ -450,6 +454,8 @@
58 labelNumberLap1.text = countlap - 1
59 move.start()
60 move2.start()
61+ blipFist.number = stopwatchPage.seconds
62+ blipFist.visible = true
63 }
64 }
65 }

Subscribers

People subscribed via source and target branches