From 6cf38a5fd02c53732270e047bf96286d558c0f78 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Mon, 11 Sep 2017 17:58:50 +0200 Subject: add find shortcut --- framework/qml/MailListView.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'framework/qml') diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index 042196e4..6088e500 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml @@ -46,7 +46,8 @@ FocusScope { Kube.Listener { filter: Kube.Messages.search onMessageReceived: { - mailListModel.filter = message.filterString + filterField.visible = true + find.forceActiveFocus() } } @@ -72,8 +73,8 @@ FocusScope { id: filterField Layout.fillWidth: true height: Kube.Units.gridUnit * 2 - color: Kube.Colors.buttonColor + visible: false RowLayout { anchors { @@ -92,9 +93,11 @@ FocusScope { } Kube.TextField { + id: find Layout.fillWidth: true placeholderText: "Filter..." onTextChanged: mailListModel.filter = text + focus: true } } } -- cgit v1.2.3