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