@@ -0,0 +1,103 @@
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: parent.left
67+ right: parent.right
68+ leftMargin: units.gu(1)
69+ rightMargin: units.gu(1)
70+ }
71+
72+ color: Theme.palette.selected.backgroundText
73+ opacity: 0.9
74+ style: Text.Raised
75+ styleColor: "black"
76+ fontSize: "small"
77+ font.weight: Font.Bold
78+ elide: Text.ElideRight
79+ horizontalAlignment: styledItem.horizontalAlignment
80+ text: styledItem.text
81+ wrapMode: Text.WordWrap
82+ maximumLineCount: styledItem.maximumLineCount
83+ }
84+
85+ Label {
86+ id: artistLabel
87+ anchors {
88+ top: label.bottom
89+ left: parent.left
90+ right: parent.right
91+ leftMargin: units.gu(1)
92+ rightMargin: units.gu(1)
93+ }
94+
95+ color: Theme.palette.selected.backgroundText
96+ opacity: 0.9
97+ style: Text.Raised
98+ styleColor: "black"
99+ fontSize: "x-small"
100+ elide: Text.ElideMiddle
101+ horizontalAlignment: styledItem.horizontalAlignment
102+ }
103+}