diff options
Diffstat (limited to 'app/qml/pages/WebItemSelDialog.qml')
| -rw-r--r-- | app/qml/pages/WebItemSelDialog.qml | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/app/qml/pages/WebItemSelDialog.qml b/app/qml/pages/WebItemSelDialog.qml new file mode 100644 index 0000000..f8c49f2 --- /dev/null +++ b/app/qml/pages/WebItemSelDialog.qml @@ -0,0 +1,45 @@ +import QtQuick 2.0 +import QtQml 2.1 +import Sailfish.Silica 1.0 + +Dialog { + id: itemSelDialog + property alias model: listView.model + property int selectedIndex: -1 + + SilicaListView { + id: listView + anchors.fill: parent + + VerticalScrollDecorator { flickable: webview } + + header: PageHeader { + } + + delegate: ListItem { + id: itemDelegate + contentHeight: Theme.itemSizeSmall + + Label { + anchors { + left: parent.left + leftMargin: Theme.paddingMedium + right: parent.right + rightMargin: Theme.paddingMedium + verticalCenter: parent.verticalCenter + } + text: model.text + color: model.enabled ? + (itemDelegate.highlighted ? Theme.highlightColor : Theme.primaryColor) + : Theme.secondaryColor + truncationMode: TruncationMode.Fade + } + + enabled: model.enabled + onClicked: { + selectedIndex = model.index; + accept(); + } + } + } +} |
