]> git.tdb.fi Git - xinema.git/blobdiff - remote/qml/components/DirectoryEntry.qml
Move non-page qml components to a separate subdirectory
[xinema.git] / remote / qml / components / DirectoryEntry.qml
diff --git a/remote/qml/components/DirectoryEntry.qml b/remote/qml/components/DirectoryEntry.qml
new file mode 100644 (file)
index 0000000..2c97456
--- /dev/null
@@ -0,0 +1,47 @@
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+Item
+{
+       id: entry
+
+       property alias icon: icon.source
+       property alias text: label.text
+       property int iconSize: Theme.iconSizeMedium
+       height: row.height
+
+       signal clicked()
+
+       Row
+       {
+               id: row
+               spacing: Theme.paddingMedium
+               anchors
+               {
+                       left: parent.left
+                       right: parent.right
+                       margins: Theme.horizontalPageMargin
+               }
+
+               Image
+               {
+                       id: icon
+                       sourceSize.width: iconSize
+                       sourceSize.height: iconSize
+                       width: iconSize
+                       height: iconSize
+               }
+               Label
+               {
+                       id: label
+                       height: icon.height
+                       verticalAlignment: Text.AlignVCenter
+               }
+       }
+
+       MouseArea
+       {
+               anchors.fill: parent
+               onClicked: entry.clicked();
+       }
+}