summaryrefslogtreecommitdiff
path: root/qml/pages/AddWidget.qml
diff options
context:
space:
mode:
authorJavier S. Pedro <dev.git@javispedro.com>2014-09-13 22:40:39 +0200
committerJavier S. Pedro <dev.git@javispedro.com>2014-09-13 22:40:39 +0200
commit85fb48bc51fed06a50b6178727fdf9e96aea4fc4 (patch)
treee5aa942addaf99bb29c73f5e946cf250ca8b80f8 /qml/pages/AddWidget.qml
parented40a7f1cbc1da5ae21c58882df241fc0071c2f7 (diff)
downloadsalmeta-85fb48bc51fed06a50b6178727fdf9e96aea4fc4.tar.gz
salmeta-85fb48bc51fed06a50b6178727fdf9e96aea4fc4.zip
UI can now add some widgets around
Diffstat (limited to 'qml/pages/AddWidget.qml')
-rw-r--r--qml/pages/AddWidget.qml36
1 files changed, 36 insertions, 0 deletions
diff --git a/qml/pages/AddWidget.qml b/qml/pages/AddWidget.qml
new file mode 100644
index 0000000..50bf63d
--- /dev/null
+++ b/qml/pages/AddWidget.qml
@@ -0,0 +1,36 @@
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+import com.javispedro.salmeta 1.0
+
+Page {
+ id: page
+
+ property int addToPage
+ property int addToPos
+
+ SilicaListView {
+ id: allWidgetsListView
+ anchors.fill: parent
+
+ model: allWidgets
+
+ header: PageHeader {
+ title: "Add widget"
+ }
+
+ delegate : BackgroundItem {
+ contentHeight: Theme.itemSizeMedium
+
+ Label {
+ text: url
+ truncationMode: TruncationMode.Elide
+ color: highlighted ? Theme.highlightColor : Theme.primaryColor
+ }
+
+ onClicked: {
+ curWidgets.addWidget(url, addToPage, addToPos, size);
+ pageStack.pop();
+ }
+ }
+ }
+}