on xenial help sign in
Visual improvements to the dash audio play cards
ac4d60bAlbert Astals Cid
plugins/Dash/CardCreator.js+11−2
@@ -155,11 +155,20 @@ var kAudioButtonCode = 'AbstractButton { \n\
155 visible: parent.pressed; \n\
155 visible: parent.pressed; \n\
156 radius: "medium"; \n\
156 radius: "medium"; \n\
157 } \n\
157 } \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\
158 Icon { \n\
165 Icon { \n\
159− anchors.fill: parent; \n\
166+ anchors.centerIn: parent; \n\
160− anchors.margins: parent.height > units.gu(5) ? units.gu(2) : 0; \n\
167+ width: parent.width * 0.3; \n\
168+ height: width; \n\
161 opacity: 0.9; \n\
169 opacity: 0.9; \n\
162 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start"; \n\
170 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start"; \n\
171+ color: "white"; \n\
163 } \n\
172 } \n\
164 onClicked: { \n\
173 onClicked: { \n\
165 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) { \n\
174 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) { \n\
tests/plugins/Dash/cardcreator/9.res+12−3
@@ -2,7 +2,7 @@ AbstractButton {
2 id: root;
2 id: root;
3 property var cardData;
3 property var cardData;
4 property string artShapeStyle: "inset";
4 property string artShapeStyle: "inset";
5− property string backgroundShapeStyle: "inset";
5+ property string backgroundShapeStyle: "inset";
6 property real fontScale: 1.0;
6 property real fontScale: 1.0;
7 property var scopeStyle: null;
7 property var scopeStyle: null;
8 property int titleAlignment: Text.AlignLeft;
8 property int titleAlignment: Text.AlignLeft;
@@ -79,11 +79,20 @@ CardAudioProgress {
79 visible: parent.pressed;
79 visible: parent.pressed;
80 radius: "medium";
80 radius: "medium";
81 }
81 }
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+ }
82 Icon {
89 Icon {
83− anchors.fill: parent;
90+ anchors.centerIn: parent;
84− anchors.margins: parent.height > units.gu(5) ? units.gu(2) : 0;
91+ width: parent.width * 0.3;
92+ height: width;
85 opacity: 0.9;
93 opacity: 0.9;
86 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start";
94 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start";
95+ color: "white";
87 }
96 }
88 onClicked: {
97 onClicked: {
89 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) {
98 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) {