From d4813dc11b30c59cd1951a0c79d075c1756cbdfb Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Sat, 21 Nov 2015 11:49:53 +0100 Subject: add email searchbox --- .../package/contents/ui/FolderListView.qml | 73 +++++++++++++++------- 1 file changed, 51 insertions(+), 22 deletions(-) (limited to 'applications/kmail-quick/package/contents/ui') diff --git a/applications/kmail-quick/package/contents/ui/FolderListView.qml b/applications/kmail-quick/package/contents/ui/FolderListView.qml index ee23bdf9..4a341a1a 100644 --- a/applications/kmail-quick/package/contents/ui/FolderListView.qml +++ b/applications/kmail-quick/package/contents/ui/FolderListView.qml @@ -21,38 +21,67 @@ import QtQuick.Layouts 1.1 import org.kde.plasma.core 2.0 as PlasmaCore -ListView { - id: root - model: FolderModel {} +Item { - delegate: ListItem { + Item { + id: searchBox width: root.width - height: unit.size * 10 + height: unit.size * 12 - PlasmaCore.IconItem { - id: iconItem + TextField { + anchors. centerIn: parent - anchors { - verticalCenter: parent.verticalCenter - left: parent.left - leftMargin: unit.size * 3 - } + width: parent.width * 0.9 + + placeholderText: "Search email..." + + } + } + + ListView { + id: root - source: model.icon + clip: true + + anchors { + top: searchBox.bottom + left: parent.left + right: parent.right + bottom: parent.bottom } - Label { - id: label + model: FolderModel {} + + delegate: ListItem { - anchors { - verticalCenter: parent.verticalCenter - left: iconItem.right - leftMargin: unit.size * 3 - } + width: root.width + height: unit.size * 10 - text: model.name - } + PlasmaCore.IconItem { + id: iconItem + + anchors { + verticalCenter: parent.verticalCenter + left: parent.left + leftMargin: unit.size * 3 + } + + source: model.icon + } + + Label { + id: label + + anchors { + verticalCenter: parent.verticalCenter + left: iconItem.right + leftMargin: unit.size * 3 + } + + text: model.name + } + } } } \ No newline at end of file -- cgit v1.2.3