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