14
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
* Authored by Andrea Cimitan <andrea.cimitan@canonical.com>
17
* Marco Trevisan <marco.trevisan@canonical.com>
20
21
import Ubuntu.Components 1.3
21
import Ubuntu.Components.ListItems 1.3 as ListItem
22
import QtQuick.Layouts 1.1
23
22
import Ubuntu.Thumbnailer 0.1
28
27
property bool showTrack: false
29
property alias playerName: playerNameLabel.text
28
property alias playerName: menu.text
30
29
property alias playerIcon: playerIcon.source
32
31
property alias albumArt: albumArtImage.source
33
property alias song: songLabel.text
34
property alias artist: artistLabel.text
35
property alias album: albumLabel.text
33
property string artist
37
__height: column.height + units.gu(2)
36
highlightWhenPressed: false
37
implicitHeight: (albumLayout.visible ? albumLayout.height : layout.height) + (divider.visible ? divider.height : 0)
38
38
Behavior on implicitHeight { UbuntuNumberAnimation {} }
45
leftMargin: menu.__contentsMargins
46
rightMargin: menu.__contentsMargins
47
verticalCenter: parent.verticalCenter
53
spacing: menu.__contentsMargins
55
anchors { left: parent.left; right: parent.right }
59
Layout.preferredHeight: units.gu(5)
60
Layout.preferredWidth: units.gu(5)
65
Layout.fillWidth: true
66
Layout.alignment: Qt.AlignVCenter
67
elide: Text.ElideRight
73
objectName: "albumArt"
77
anchors { left: parent.left; right: parent.right }
80
Layout.preferredHeight: units.gu(8)
81
Layout.preferredWidth: units.gu(8)
87
fillMode: Image.PreserveAspectFit
88
sourceSize: Qt.size(width, height)
89
anchors.centerIn: parent
94
Layout.alignment: Qt.AlignVCenter
95
Layout.fillWidth: true
96
spacing: units.gu(0.5)
100
elide: Text.ElideRight
103
anchors { left: parent.left; right: parent.right }
108
elide: Text.ElideRight
111
anchors { left: parent.left; right: parent.right }
116
elide: Text.ElideRight
120
anchors { left: parent.left; right: parent.right }
40
layout.visible: !albumLayout.visible
41
layout.objectName: "player"
47
SlotsLayout.position: SlotsLayout.Leading
52
objectName: "albumArt"
55
subtitle.text: menu.artist
56
summary.text: menu.album
61
SlotsLayout.position: SlotsLayout.Leading
65
fillMode: Image.PreserveAspectFit
66
sourceSize: Qt.size(width, height)