~mzanetti/unity8/fix-1648251

« back to all changes in this revision

Viewing changes to qml/Dash/Previews/PreviewAudioPlayback.qml

  • Committer: Michael Zanetti
  • Date: 2016-12-01 12:20:34 UTC
  • mfrom: (2525.1.179 unity8)
  • Revision ID: michael.zanetti@canonical.com-20161201122034-cpvbf7webbhg2wph
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
                Row {
59
59
                    id: trackRow
60
60
 
61
 
                    readonly property int column1Width: units.gu(3)
 
61
                    readonly property int column1Width: units.gu(2)
62
62
                    readonly property int column2Width: width - (2 * spacing) - column1Width - column3Width
63
63
                    readonly property int column3Width: units.gu(4)
64
64
 
66
66
                    width: parent.width
67
67
                    spacing: units.gu(1)
68
68
 
69
 
                    Button {
 
69
                    AbstractButton {
70
70
                        objectName: "playButton"
71
71
                        width: trackRow.column1Width
72
72
                        height: width
73
 
                        iconSource: DashAudioPlayer.playing && trackItem.isPlayingItem ? "image://theme/media-playback-pause" : "image://theme/media-playback-start"
74
 
                        activeFocusOnPress: false
75
 
 
76
 
                        // Can't be "transparent" or "#00xxxxxx" as the button optimizes away the surrounding shape
77
 
                        // FIXME when this is resolved: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1251685
78
 
                        color: "#01000000"
79
73
 
80
74
                        onClicked: {
81
75
                            if (trackItem.isPlayingItem) {
92
86
                                DashAudioPlayer.playSource(sourceUrl, playlist);
93
87
                            }
94
88
                        }
 
89
 
 
90
                        Icon {
 
91
                            anchors.fill: parent
 
92
                            source: DashAudioPlayer.playing && trackItem.isPlayingItem ? "image://theme/media-preview-pause" : "image://theme/media-preview-start"
 
93
                        }
95
94
                    }
96
95
 
97
96
                    Item {
105
104
                            anchors { top: parent.top; left: parent.left; right: parent.right }
106
105
                            opacity: 0.9
107
106
                            color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
108
 
                            fontSize: "small"
 
107
                            fontSize: "medium"
 
108
                            font.weight: Font.Light
109
109
                            horizontalAlignment: Text.AlignLeft
110
110
                            text: modelData["title"]
111
111
                            elide: Text.ElideRight
140
140
                        opacity: 0.9
141
141
                        color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
142
142
                        fontSize: "small"
 
143
                        font.weight: Font.Light
143
144
                        horizontalAlignment: Text.AlignRight
144
145
                        text: DashAudioPlayer.lengthToString(modelData["length"])
145
146
                    }