@@ -0,0 +1,87 @@
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+ anchors.fill: parent
24+
25+ UbuntuShape {
26+ id: icon
27+ anchors {
28+ top: parent.top
29+ horizontalCenter: parent.horizontalCenter
30+ }
31+ radius: "medium"
32+ width: styledItem.imageWidth
33+ height: styledItem.imageHeight
34+ image: Image {
35+ id: image
36+ objectName: "image"
37+ sourceSize { width: icon.width; height: icon.height }
38+ asynchronous: true
39+ cache: false
40+ source: styledItem.source
41+ fillMode: styledItem.fillMode
42+ horizontalAlignment: styledItem.horizontalAlignment
43+ verticalAlignment: styledItem.verticalAlignment
44+ }
45+ }
46+
47+ UbuntuShape {
48+ id: borderPressed
49+ objectName: "borderPressed"
50+
51+ anchors.fill: icon
52+ radius: "medium"
53+ borderSource: "radius_pressed.sci"
54+ opacity: styledItem.pressed ? 1.0 : 0.0
55+ Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
56+ }
57+
58+ Item {
59+ anchors {
60+ left: parent.left
61+ right: parent.right
62+ top: icon.bottom
63+ }
64+ height: units.gu(2)
65+
66+ Label {
67+ id: label
68+ objectName: "label"
69+ anchors {
70+ baseline: parent.bottom
71+ left: parent.left
72+ right: parent.right
73+ leftMargin: units.gu(1)
74+ rightMargin: units.gu(1)
75+ }
76+
77+ color: Theme.palette.selected.backgroundText
78+ opacity: 0.9
79+ style: Text.Raised
80+ styleColor: "black"
81+ fontSize: "small"
82+ elide: Text.ElideMiddle
83+ horizontalAlignment: Text.AlignHCenter
84+ text: styledItem.text
85+ }
86+ }
87+}