Merge lp:~nik90/podbird/12-optimize-playbar into lp:podbird

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Michael Sheldon
Approved revision: 83
Merged at revision: 88
Proposed branch: lp:~nik90/podbird/12-optimize-playbar
Merge into: lp:podbird
Prerequisite: lp:~nik90/podbird/11-enable-rotation
Diff against target: 116 lines (+31/-22)
3 files modified
app/podbird.qml (+29/-15)
app/ui/PlayerControls.qml (+0/-5)
po/com.mikeasoft.podbird.pot (+2/-2)
To merge this branch: bzr merge lp:~nik90/podbird/12-optimize-playbar
Reviewer Review Type Date Requested Status
Michael Sheldon Approve
Review via email: mp+257452@code.launchpad.net

Description of the change

- Improves the show/hide animation of the bottom bar manipulating the bottomMargin variable instead of the height resulting in a more smoother feel

- The player control bottom bar is now loaded dynamically using a QML Loader.

To post a comment you must log in.
82. By Nekhelesh Ramananthan

Merged prerequisite lp:~nik90/podbird/11-enable-rotation

83. By Nekhelesh Ramananthan

merged lp:~nik90/podbird/11-enable-rotation

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/podbird.qml'
2--- app/podbird.qml 2015-06-13 16:54:25 +0000
3+++ app/podbird.qml 2015-06-13 16:54:26 +0000
4@@ -259,32 +259,46 @@
5 }
6 }
7
8- PlayerControls {
9- id: playerControl
10+ Loader {
11+ id: playerControlLoader
12
13+ anchors.bottom: parent.bottom
14+ height: units.gu(7)
15+ width: parent.width
16 visible: !Qt.inputMethod.visible
17- anchors.bottom: parent.bottom
18
19- state: "hidden"
20+ state: "shown"
21 states: [
22 State {
23 name: "shown"
24 when: player.source != "" && !mainStack.currentPage.isNowPlayingPage
25- PropertyChanges { target: playerControl; height: units.gu(7) }
26+ PropertyChanges { target: playerControlLoader; anchors.bottomMargin: 0 }
27 },
28
29 State {
30 name: "hidden"
31- when: player.source == ""
32- PropertyChanges { target: playerControl; height: 0 }
33- }
34- ]
35-
36- Behavior on height {
37- UbuntuNumberAnimation {
38- duration: UbuntuAnimation.SlowDuration
39- }
40- }
41+ when: player.source == "" || mainStack.currentPage.isNowPlayingPage || !playerControl.visible
42+ PropertyChanges { target: playerControlLoader; anchors.bottomMargin: -units.gu(7) }
43+ }
44+ ]
45+
46+ transitions: [
47+ Transition {
48+ from: "hidden"; to: "shown"
49+ SequentialAnimation {
50+ ScriptAction { script: playerControlLoader.source = Qt.resolvedUrl("ui/PlayerControls.qml") }
51+ UbuntuNumberAnimation { target: playerControlLoader; property: "anchors.bottomMargin"; duration: UbuntuAnimation.SlowDuration }
52+ }
53+ },
54+
55+ Transition {
56+ from: "shown"; to: "hidden"
57+ SequentialAnimation {
58+ UbuntuNumberAnimation { target: playerControlLoader; property: "anchors.bottomMargin"; duration: UbuntuAnimation.SlowDuration }
59+ ScriptAction { script: playerControlLoader.source = "" }
60+ }
61+ }
62+ ]
63 }
64
65 function cleanUp(today, retentionDays) {
66
67=== modified file 'app/ui/PlayerControls.qml'
68--- app/ui/PlayerControls.qml 2015-04-22 10:15:34 +0000
69+++ app/ui/PlayerControls.qml 2015-06-13 16:54:26 +0000
70@@ -24,8 +24,6 @@
71 Rectangle {
72 id: controlRect
73
74- height: 0
75- width: parent.width
76 color: podbird.appTheme.bottomBarBackground
77
78 MouseArea {
79@@ -38,7 +36,6 @@
80
81 Item {
82 anchors.fill: parent
83- visible: controlRect.height > 0
84
85 Image {
86 id: cover
87@@ -94,8 +91,6 @@
88 height: cover.height
89 anchors.verticalCenter: parent.verticalCenter
90 anchors.right: parent.right
91- enabled: controlRect.height > 0
92- visible: enabled
93
94 Rectangle {
95 id: playButtonBackground
96
97=== modified file 'po/com.mikeasoft.podbird.pot'
98--- po/com.mikeasoft.podbird.pot 2015-06-13 16:54:25 +0000
99+++ po/com.mikeasoft.podbird.pot 2015-06-13 16:54:26 +0000
100@@ -8,7 +8,7 @@
101 msgstr ""
102 "Project-Id-Version: \n"
103 "Report-Msgid-Bugs-To: \n"
104-"POT-Creation-Date: 2015-04-28 14:20+0000\n"
105+"POT-Creation-Date: 2015-04-28 23:23+0000\n"
106 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
107 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
108 "Language-Team: LANGUAGE <LL@li.org>\n"
109@@ -512,6 +512,6 @@
110 msgid "Finish"
111 msgstr ""
112
113-#: /home/krnekhelesh/Documents/Ubuntu-Projects/MP-Reviews/builddir/build-11-enable-rotation-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_15_04_vivid-Default/po/Podbird.desktop.in.h:1
114+#: /home/krnekhelesh/Documents/Ubuntu-Projects/MP-Reviews/builddir/build-12-optimize-playbar-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_15_04_vivid-Default/po/Podbird.desktop.in.h:1
115 msgid "The chirpiest podcast manager for Ubuntu"
116 msgstr ""

Subscribers

People subscribed via source and target branches