summaryrefslogtreecommitdiff
path: root/qml/EmptyListDelegate.qml
blob: 71fa3dc76e70678ac6dae5ce7187c140af3330de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import QtQuick 1.1
import com.nokia.meego 1.1

Item {
	id: listItem

	signal clicked
	property alias pressed: mouseArea.pressed
	property bool unread: false

	anchors.left: parent.left
	anchors.right: parent.right
	anchors.leftMargin: UiConstants.ButtonSpacing
	height: UiConstants.ListItemHeightDefault

	BorderImage {
		id: background
		anchors.fill: parent
		anchors.leftMargin: -(UiConstants.DefaultMargin+parent.anchors.leftMargin)
		anchors.rightMargin: -UiConstants.DefaultMargin
		border { left: 22; right: 22; top: 22; bottom: 22; }
		visible: pressed || unread
		source: "image://theme/meegotouch" + (unread|(!unread&&!pressed)?"-unread-inbox":"")
				+ "-panel" + (theme.inverted?"-inverted":"")
				+ "-background" + (pressed?"-pressed":"")
	}

	MouseArea {
		id: mouseArea;
		anchors.fill: parent
		onClicked: {
			listItem.clicked();
		}
	}
}