diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-09-11 17:58:50 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-09-11 17:58:50 +0200 |
commit | 6cf38a5fd02c53732270e047bf96286d558c0f78 (patch) | |
tree | c8b0aa8b01b313f3f27fa57ea01d7b7711f57e73 /framework/qml/MailListView.qml | |
parent | 9a059cbeb0c7ce778ecccb4d01a94948ce937720 (diff) | |
download | kube-6cf38a5fd02c53732270e047bf96286d558c0f78.tar.gz kube-6cf38a5fd02c53732270e047bf96286d558c0f78.zip |
add find shortcut
Diffstat (limited to 'framework/qml/MailListView.qml')
-rw-r--r-- | framework/qml/MailListView.qml | 7 |
1 files changed, 5 insertions, 2 deletions
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 { | |||
46 | Kube.Listener { | 46 | Kube.Listener { |
47 | filter: Kube.Messages.search | 47 | filter: Kube.Messages.search |
48 | onMessageReceived: { | 48 | onMessageReceived: { |
49 | mailListModel.filter = message.filterString | 49 | filterField.visible = true |
50 | find.forceActiveFocus() | ||
50 | } | 51 | } |
51 | } | 52 | } |
52 | 53 | ||
@@ -72,8 +73,8 @@ FocusScope { | |||
72 | id: filterField | 73 | id: filterField |
73 | Layout.fillWidth: true | 74 | Layout.fillWidth: true |
74 | height: Kube.Units.gridUnit * 2 | 75 | height: Kube.Units.gridUnit * 2 |
75 | |||
76 | color: Kube.Colors.buttonColor | 76 | color: Kube.Colors.buttonColor |
77 | visible: false | ||
77 | 78 | ||
78 | RowLayout { | 79 | RowLayout { |
79 | anchors { | 80 | anchors { |
@@ -92,9 +93,11 @@ FocusScope { | |||
92 | } | 93 | } |
93 | 94 | ||
94 | Kube.TextField { | 95 | Kube.TextField { |
96 | id: find | ||
95 | Layout.fillWidth: true | 97 | Layout.fillWidth: true |
96 | placeholderText: "Filter..." | 98 | placeholderText: "Filter..." |
97 | onTextChanged: mailListModel.filter = text | 99 | onTextChanged: mailListModel.filter = text |
100 | focus: true | ||
98 | } | 101 | } |
99 | } | 102 | } |
100 | } | 103 | } |