diff options
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(); + } + } + } +} |