on xenial help sign in
use a button and make contents transparent
ede29e3Michael Zanetti
Dash/Music/MusicPreview.qml+3−14
@@ -118,23 +118,12 @@ GenericPreview {
118 property int column3Width: units.gu(4)
118 property int column3Width: units.gu(4)
119 anchors.verticalCenter: parent.verticalCenter
119 anchors.verticalCenter: parent.verticalCenter
120
120
121− AbstractButton {
121+ Button {
122 objectName: "playButton"
122 objectName: "playButton"
123 width: trackRow.column1Width
123 width: trackRow.column1Width
124 height: width
124 height: width
125−
126− UbuntuShape {
127− id: playButtonShape
128− anchors.fill: parent
129− Icon {
130− width: units.gu(2)
131− height: width
132− anchors.centerIn: playButtonShape
133− name: audioPlayer.playbackState == Audio.PlayingState && trackItem.isPlayingItem ? "media-playback-pause" : "media-playback-start"
125+ iconSource: audioPlayer.playbackState == Audio.PlayingState && trackItem.isPlayingItem ? "image://theme/media-playback-pause" : "image://theme/media-playback-start"
134− color: "white"
126+ color: "#01000000" // Can't be "transparent" or "#00xxxxxx" as the button optimizes away the surrounding shape
135− opacity: .9
136− }
137− }
138
127
139 onClicked: {
128 onClicked: {
140 if (trackItem.isPlayingItem) {
129 if (trackItem.isPlayingItem) {