summaryrefslogtreecommitdiff
path: root/qml/EmptyListDelegate.qml
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-04-04 15:49:31 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-04-04 15:49:31 +0200
commitd8fcff1a2d6eb61c97c44790dbdb920ba9f52980 (patch)
tree49df7f1e07e34061301ad5944a1807feba24b526 /qml/EmptyListDelegate.qml
parent11b4152301b408c7a4f02a8b202fed9f5e1ee1e7 (diff)
downloadtapasboard-d8fcff1a2d6eb61c97c44790dbdb920ba9f52980.tar.gz
tapasboard-d8fcff1a2d6eb61c97c44790dbdb920ba9f52980.zip
add showing unread posts
Diffstat (limited to 'qml/EmptyListDelegate.qml')
-rw-r--r--qml/EmptyListDelegate.qml35
1 files changed, 35 insertions, 0 deletions
diff --git a/qml/EmptyListDelegate.qml b/qml/EmptyListDelegate.qml
new file mode 100644
index 0000000..71fa3dc
--- /dev/null
+++ b/qml/EmptyListDelegate.qml
@@ -0,0 +1,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();
+ }
+ }
+}