Merge lp:~rpadovani/reminders-app/bouncingProgressBar into lp:reminders-app

Proposed by Riccardo Padovani
Status: Merged
Approved by: Michael Zanetti
Approved revision: 262
Merged at revision: 268
Proposed branch: lp:~rpadovani/reminders-app/bouncingProgressBar
Merge into: lp:reminders-app
Diff against target: 121 lines (+59/-12)
3 files modified
src/app/qml/components/BouncingProgressBar.qml (+48/-0)
src/app/qml/ui/NoteView.qml (+8/-8)
src/app/qml/ui/NotesPage.qml (+3/-4)
To merge this branch: bzr merge lp:~rpadovani/reminders-app/bouncingProgressBar
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+236226@code.launchpad.net

Commit message

Added a bouncing ProgressBar

Description of the change

As discussed during last meeting, I added a bouncing ProgressBar that is visible when a note is loaded and on the main screen

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: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

inline

review: Needs Fixing
261. By Riccardo Padovani

better implementation of bouncing bar

262. By Riccardo Padovani

Fixed a typo about easing animation

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
Michael Zanetti (mzanetti) wrote :

ack

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'src/app/qml/components/BouncingProgressBar.qml'
2--- src/app/qml/components/BouncingProgressBar.qml 1970-01-01 00:00:00 +0000
3+++ src/app/qml/components/BouncingProgressBar.qml 2014-10-07 18:03:59 +0000
4@@ -0,0 +1,48 @@
5+/*
6+ * Copyright: 2014 Canonical, Ltd
7+ *
8+ * This file is part of reminders-app
9+ *
10+ * reminders-app is free software: you can redistribute it and/or modify
11+ * it under the terms of the GNU General Public License as published by
12+ * the Free Software Foundation; version 3.
13+ *
14+ * reminders-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+Item {
27+ height: units.dp(3)
28+ width: parent.width
29+
30+ onVisibleChanged: visible ? animation.start() : animation.stop()
31+
32+ Rectangle {
33+ id: rectangle
34+ anchors.fill: parent
35+ color: UbuntuColors.orange
36+ visible: animation.running // Avoid to show the orange bar before animation starts
37+ }
38+
39+ SequentialAnimation {
40+ id: animation
41+ loops: Animation.Infinite
42+
43+ ParallelAnimation {
44+ PropertyAnimation { target: rectangle; property: "anchors.leftMargin"; from: 0; to: width * 7/8; duration: 1000; easing.type: Easing.InOutQuad }
45+ PropertyAnimation { target: rectangle; property: "anchors.rightMargin"; from: width * 7/8; to: 0; duration: 1000; easing.type: Easing.InOutQuad }
46+ }
47+ ParallelAnimation {
48+ PropertyAnimation { target: rectangle; property: "anchors.leftMargin"; from: width * 7/8; to: 0; duration: 1000; easing.type: Easing.InOutQuad }
49+ PropertyAnimation { target: rectangle; property: "anchors.rightMargin"; from: 0; to: width * 7/8; duration: 1000; easing.type: Easing.InOutQuad }
50+ }
51+ }
52+}
53
54=== modified file 'src/app/qml/ui/NoteView.qml'
55--- src/app/qml/ui/NoteView.qml 2014-09-23 12:39:27 +0000
56+++ src/app/qml/ui/NoteView.qml 2014-10-07 18:03:59 +0000
57@@ -18,7 +18,7 @@
58
59 import QtQuick 2.3
60 import Ubuntu.Components 1.1
61-import com.canonical.Oxide 1.0
62+import com.canonical.Oxide 1.0
63 import Evernote 0.1
64 import "../components"
65
66@@ -34,14 +34,14 @@
67 NotesStore.refreshNoteContent(root.note.guid)
68 }
69
70- ActivityIndicator {
71- anchors.centerIn: parent
72- running: root.note.loading
73- visible: running
74+ BouncingProgressBar {
75+ anchors.top: parent.top
76+ visible: root.note.loading
77+ z: 10
78 }
79
80 WebContext {
81- id: webContext
82+ id: webContext
83
84 userScripts: [
85 UserScript {
86@@ -56,7 +56,7 @@
87 anchors { fill: parent}
88
89 property string html: note.htmlContent
90-
91+
92 onHtmlChanged: {
93 loadHtml(html, "file:///")
94 }
95@@ -85,7 +85,7 @@
96 NotesStore.saveNote(note.guid);
97 break;
98 }
99- }
100+ }
101 }
102 ]
103 }
104
105=== modified file 'src/app/qml/ui/NotesPage.qml'
106--- src/app/qml/ui/NotesPage.qml 2014-09-23 12:39:27 +0000
107+++ src/app/qml/ui/NotesPage.qml 2014-10-07 18:03:59 +0000
108@@ -193,10 +193,9 @@
109 }
110 }
111
112- ActivityIndicator {
113- anchors.centerIn: parent
114- running: notes.loading
115- visible: running
116+ BouncingProgressBar {
117+ anchors.top: parent.top
118+ visible: notes.loading
119 }
120 Label {
121 anchors.centerIn: parent

Subscribers

People subscribed via source and target branches