on xenial help sign in
Audio Cards: Make some of the image loading async
d0b7bccAlbert Astals Cid
debian/control+4−4
@@ -55,7 +55,7 @@ Build-Depends: cmake,
55 qtdeclarative5-qtmultimedia-plugin (>= 5.4.1-1ubuntu19~overlay2),
55 qtdeclarative5-qtmultimedia-plugin (>= 5.4.1-1ubuntu19~overlay2),
56 qtdeclarative5-ubuntu-content1,
56 qtdeclarative5-ubuntu-content1,
57 qtdeclarative5-ubuntu-settings-components (>= 0.7),
57 qtdeclarative5-ubuntu-settings-components (>= 0.7),
58− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1796) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1796),
58+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1845) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1845),
59 qtdeclarative5-ubuntu-web-plugin,
59 qtdeclarative5-ubuntu-web-plugin,
60 ttf-ubuntu-font-family,
60 ttf-ubuntu-font-family,
61Standards-Version: 3.9.4
61Standards-Version: 3.9.4
@@ -70,7 +70,7 @@ X-Ubuntu-Use-Langpack: yes
70Package: indicators-client
70Package: indicators-client
71Architecture: amd64 armhf i386
71Architecture: amd64 armhf i386
72Depends: qmenumodel-qml (>= 0.2.9),
72Depends: qmenumodel-qml (>= 0.2.9),
73− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1796) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1796),
73+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1845) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1845),
74 unity8 (= ${binary:Version}),
74 unity8 (= ${binary:Version}),
75 ${misc:Depends},
75 ${misc:Depends},
76 ${shlibs:Depends},
76 ${shlibs:Depends},
@@ -128,7 +128,7 @@ Architecture: all
128Depends: qml-module-qtquick-layouts,
128Depends: qml-module-qtquick-layouts,
129 qtdeclarative5-ubuntu-settings-components (>= 0.7),
129 qtdeclarative5-ubuntu-settings-components (>= 0.7),
130 qtdeclarative5-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
130 qtdeclarative5-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
131− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1796) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1796),
131+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1845) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1845),
132 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
132 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
133 ubuntu-thumbnailer-impl-0,
133 ubuntu-thumbnailer-impl-0,
134 unity-application-impl-13,
134 unity-application-impl-13,
@@ -158,7 +158,7 @@ Depends: autopilot-qt5 (>= 1.4),
158 python3-fixtures,
158 python3-fixtures,
159 python3-gi,
159 python3-gi,
160 qttestability-autopilot (>= 1.4),
160 qttestability-autopilot (>= 1.4),
161− ubuntu-ui-toolkit-autopilot (>= 1.3.1796),
161+ ubuntu-ui-toolkit-autopilot (>= 1.3.1845),
162 unity-scope-click,
162 unity-scope-click,
163 unity8 (= ${source:Version}),
163 unity8 (= ${source:Version}),
164 unity8-fake-env (= ${source:Version}),
164 unity8-fake-env (= ${source:Version}),
plugins/Dash/AudioProgressBar.qml+1
@@ -31,6 +31,7 @@ Item {
31 anchors { left: parent.left; right: parent.right }
31 anchors { left: parent.left; right: parent.right }
32 height: units.dp(6)
32 height: units.dp(6)
33 source: "graphics/music_progress_bg.png"
33 source: "graphics/music_progress_bg.png"
34+ asynchronous: true
34 sourceSize.width: width
35 sourceSize.width: width
35 sourceSize.height: height
36 sourceSize.height: height
36 }
37 }
plugins/Dash/CardCreator.js+3−1
@@ -146,6 +146,7 @@ var kArtShapeHolderCode = 'Item { \n\
146// %1 is anchors.fill
146// %1 is anchors.fill
147// %2 is width
147// %2 is width
148// %3 is height
148// %3 is height
149+// %4 is whether the icon should be asynchronous or not
149var kAudioButtonCode = 'AbstractButton { \n\
150var kAudioButtonCode = 'AbstractButton { \n\
150 id: audioButton; \n\
151 id: audioButton; \n\
151 anchors.fill: %1; \n\
152 anchors.fill: %1; \n\
@@ -171,6 +172,7 @@ var kAudioButtonCode = 'AbstractButton { \n\
171 opacity: 0.9; \n\
172 opacity: 0.9; \n\
172 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start"; \n\
173 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start"; \n\
173 color: "white"; \n\
174 color: "white"; \n\
175+ asynchronous: %4; \n\
174 } \n\
176 } \n\
175 onClicked: { \n\
177 onClicked: { \n\
176 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) { \n\
178 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) { \n\
@@ -818,7 +820,7 @@ function cardString(template, components, isCardTool) {
818 audioButtonHeight = isCardTool ? 'headerHeight + 2 * units.gu(1)'
820 audioButtonHeight = isCardTool ? 'headerHeight + 2 * units.gu(1)'
819 : 'root.fixedHeaderHeight + 2 * units.gu(1)';
821 : 'root.fixedHeaderHeight + 2 * units.gu(1)';
820 }
822 }
821− code += kAudioButtonCode.arg(audioButtonAnchorsFill).arg(audioButtonWidth).arg(audioButtonHeight);
823+ code += kAudioButtonCode.arg(audioButtonAnchorsFill).arg(audioButtonWidth).arg(audioButtonHeight).arg(asynchronous);
822 }
824 }
823
825
824 if (hasSummary) {
826 if (hasSummary) {
tests/plugins/Dash/cardcreator/9.res+2−1
@@ -91,7 +91,8 @@ CardAudioProgress {
91 opacity: 0.9;
91 opacity: 0.9;
92 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start";
92 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start";
93 color: "white";
93 color: "white";
94− }
94+ asynchronous: true;
95+ }
95 onClicked: {
96 onClicked: {
96 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) {
97 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) {
97 if (DashAudioPlayer.playing) {
98 if (DashAudioPlayer.playing) {
tests/plugins/Dash/cardcreator/9.res.cardcreator+1
@@ -90,6 +90,7 @@ CardAudioProgress {
90 opacity: 0.9;
90 opacity: 0.9;
91 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start";
91 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start";
92 color: "white";
92 color: "white";
93+ asynchronous: false;
93 }
94 }
94 onClicked: {
95 onClicked: {
95 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) {
96 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) {