diff options
author | Javier S. Pedro <dev.git@javispedro.com> | 2014-09-13 22:40:39 +0200 |
---|---|---|
committer | Javier S. Pedro <dev.git@javispedro.com> | 2014-09-13 22:40:39 +0200 |
commit | 85fb48bc51fed06a50b6178727fdf9e96aea4fc4 (patch) | |
tree | e5aa942addaf99bb29c73f5e946cf250ca8b80f8 /qml/pages/AddWidget.qml | |
parent | ed40a7f1cbc1da5ae21c58882df241fc0071c2f7 (diff) | |
download | salmeta-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.qml | 36 |
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(); + } + } + } +} |