on xenial help sign in
Visual improvements to the dash audio play cards
commit11d7e001f47d536bdfeca52fed43abc61d51eb9a authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 2 Feb 2016, 15:15 (11 years ago) parent2f4f64d
2 files changed+25−5
plugins/Dash/CardCreator.js+12−2 tests/plugins/Dash/cardcreator/9.res+13−3
plugins/Dash/CardCreator.js+12−2
@@ -152,11 +152,21 @@ var kAudioButtonCode = 'AbstractButton { \n\
152152 visible: parent.pressed; \n\
153153 radius: "medium"; \n\
154154 } \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\
155163 Icon { \n\
156− anchors.fill: parent; \n\
157− anchors.margins: parent.height > units.gu(5) ? units.gu(2) : 0; \n\
164+ anchors.centerIn: parent; \n\
165+ width: parent.width * 0.3; \n\
166+ height: width; \n\
158167 opacity: 0.9; \n\
159168 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start"; \n\
169+ color: "white"; \n\
160170 } \n\
161171 onClicked: { \n\
162172 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) { \n\
tests/plugins/Dash/cardcreator/9.res+13−3
@@ -3,7 +3,7 @@ AbstractButton {
33 property var components;
44 property var cardData;
55 property string artShapeStyle: "inset";
6− property string backgroundShapeStyle: "inset";
6+ property string backgroundShapeStyle: "inset";
77 property real fontScale: 1.0;
88 property var scopeStyle: null;
99 property int titleAlignment: Text.AlignLeft;
@@ -80,11 +80,21 @@ CardAudioProgress {
8080 visible: parent.pressed;
8181 radius: "medium";
8282 }
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+ }
8391 Icon {
84− anchors.fill: parent;
85− anchors.margins: parent.height > units.gu(5) ? units.gu(2) : 0;
92+ anchors.centerIn: parent;
93+ width: parent.width * 0.3;
94+ height: width;
8695 opacity: 0.9;
8796 name: DashAudioPlayer.playing && AudioUrlComparer.compare(parent.source, DashAudioPlayer.currentSource) ? "media-playback-pause" : "media-playback-start";
97+ color: "white";
8898 }
8999 onClicked: {
90100 if (AudioUrlComparer.compare(source, DashAudioPlayer.currentSource)) {