@@ -0,0 +1,101 @@
1+/*
2+ * Copyright (C) 2013 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import Ubuntu.Components 0.1
19+
20+Item {
21+ id: tile
22+
23+ property alias artist: artistLabel.text
24+
25+ anchors.fill: parent
26+
27+ UbuntuShape {
28+ id: icon
29+ anchors {
30+ top: parent.top
31+ horizontalCenter: parent.horizontalCenter
32+ }
33+ radius: "medium"
34+ width: styledItem.imageWidth
35+ height: styledItem.imageHeight
36+ image: Image {
37+ id: image
38+ objectName: "image"
39+ sourceSize { width: icon.width; height: icon.height }
40+ asynchronous: true
41+ cache: false
42+ source: styledItem.source
43+ fillMode: styledItem.fillMode
44+ horizontalAlignment: Image.AlignHCenter
45+ verticalAlignment: Image.AlignVCenter
46+ }
47+ }
48+
49+ UbuntuShape {
50+ id: borderPressed
51+ objectName: "borderPressed"
52+
53+ anchors.fill: icon
54+ radius: "medium"
55+ borderSource: "radius_pressed.sci"
56+ opacity: styledItem.pressed ? 1.0 : 0.0
57+ Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
58+ }
59+
60+ Label {
61+ id: label
62+ objectName: "label"
63+ anchors {
64+ baseline: icon.bottom
65+ baselineOffset: units.gu(2)
66+ left: icon.left
67+ right: parent.right
68+ rightMargin: units.gu(1)
69+ }
70+
71+ color: Theme.palette.selected.backgroundText
72+ opacity: 0.9
73+ style: Text.Raised
74+ styleColor: "black"
75+ fontSize: "small"
76+ font.weight: Font.Bold
77+ elide: Text.ElideRight
78+ horizontalAlignment: styledItem.horizontalAlignment
79+ text: styledItem.text
80+ wrapMode: Text.Wrap
81+ maximumLineCount: styledItem.maximumLineCount
82+ }
83+
84+ Label {
85+ id: artistLabel
86+ anchors {
87+ top: label.bottom
88+ left: label.left
89+ right: label.right
90+ rightMargin: units.gu(1)
91+ }
92+
93+ color: Theme.palette.selected.backgroundText
94+ opacity: 0.9
95+ style: Text.Raised
96+ styleColor: "black"
97+ fontSize: "x-small"
98+ elide: Text.ElideMiddle
99+ horizontalAlignment: styledItem.horizontalAlignment
100+ }
101+}