on xenial help sign in
Visual improvements to the dash audio play cards

Approved by: Andrea Cimitan

commitac4d60b20aa85c98f2b2d2f1ea9202eda1411f74 authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 12 Feb 2016, 00:11 (11 years ago) parent73b509aef97c1b
2 files changed+23−5
plugins/Dash/CardCreator.js+11−2 tests/plugins/Dash/cardcreator/9.res+12−3
plugins/Dash/CardCreator.js+11−2
@@ -155,11 +155,20 @@ var kAudioButtonCode = 'AbstractButton { \n\
155155 visible: parent.pressed; \n\
156156 radius: "medium"; \n\
157157 } \n\
158+ Rectangle { \n\
159+ color: Qt.rgba(0, 0, 0, 0.5); \n\
160+ anchors.centerIn: parent; \n\
161+ width: parent.width * 0.5; \n\
162+ height: width; \n\
163+ radius: width / 2; \n\
164+ } \n\
158165 Icon { \n\
159− anchors.fill: parent; \n\
160− anchors.margins: parent.height > units.gu(5) ? units.gu(2) : 0; \n\
166+ anchors.centerIn: parent; \n\
167+ width: parent.width * 0.3; \n\
168+ height: width; \n\
161169 opacity: 0.9; \n\
162170 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start"; \n\
171+ color: "white"; \n\
163172 } \n\
164173 onClicked: { \n\
165174 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) { \n\
tests/plugins/Dash/cardcreator/9.res+12−3
@@ -2,7 +2,7 @@ AbstractButton {
22 id: root;
33 property var cardData;
44 property string artShapeStyle: "inset";
5− property string backgroundShapeStyle: "inset";
5+ property string backgroundShapeStyle: "inset";
66 property real fontScale: 1.0;
77 property var scopeStyle: null;
88 property int titleAlignment: Text.AlignLeft;
@@ -79,11 +79,20 @@ CardAudioProgress {
7979 visible: parent.pressed;
8080 radius: "medium";
8181 }
82+ Rectangle {
83+ color: Qt.rgba(0, 0, 0, 0.5);
84+ anchors.centerIn: parent;
85+ width: parent.width * 0.5;
86+ height: width;
87+ radius: width / 2;
88+ }
8289 Icon {
83− anchors.fill: parent;
84− anchors.margins: parent.height > units.gu(5) ? units.gu(2) : 0;
90+ anchors.centerIn: parent;
91+ width: parent.width * 0.3;
92+ height: width;
8593 opacity: 0.9;
8694 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start";
95+ color: "white";
8796 }
8897 onClicked: {
8998 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) {