diff options
Diffstat (limited to 'views/search/qml/View.qml')
-rw-r--r-- | views/search/qml/View.qml | 57 |
1 files changed, 51 insertions, 6 deletions
diff --git a/views/search/qml/View.qml b/views/search/qml/View.qml index d2c8ae65..437b0ba2 100644 --- a/views/search/qml/View.qml +++ b/views/search/qml/View.qml | |||
@@ -26,14 +26,59 @@ import QtQuick.Layouts 1.1 | |||
26 | import org.kube.framework 1.0 as Kube | 26 | import org.kube.framework 1.0 as Kube |
27 | 27 | ||
28 | FocusScope { | 28 | FocusScope { |
29 | Rectangle { | 29 | SplitView { |
30 | anchors.fill: parent | 30 | anchors.fill: parent |
31 | Kube.MailListView { | 31 | ColumnLayout { |
32 | id: mailListView | 32 | width: Kube.Units.gridUnit * 18 |
33 | anchors.fill: parent | ||
34 | activeFocusOnTab: true | ||
35 | Layout.minimumWidth: Kube.Units.gridUnit * 10 | 33 | Layout.minimumWidth: Kube.Units.gridUnit * 10 |
34 | Rectangle { | ||
35 | id: filterField | ||
36 | Layout.fillWidth: true | ||
37 | height: Kube.Units.gridUnit * 2 | ||
38 | color: Kube.Colors.textColor | ||
39 | |||
40 | function clearSearch() { | ||
41 | find.text = "" | ||
42 | mailListView.filter = "" | ||
43 | } | ||
44 | |||
45 | RowLayout { | ||
46 | anchors { | ||
47 | verticalCenter: parent.verticalCenter | ||
48 | } | ||
49 | |||
50 | width: parent.width - Kube.Units.smallSpacing | ||
51 | spacing: 0 | ||
52 | |||
53 | Kube.IconButton { | ||
54 | iconName: Kube.Icons.remove | ||
55 | onClicked: filterField.clearSearch() | ||
56 | } | ||
57 | |||
58 | Kube.TextField { | ||
59 | id: find | ||
60 | Layout.fillWidth: true | ||
61 | placeholderText: qsTr("Search...") | ||
62 | onTextChanged: mailListView.filter = text | ||
63 | focus: true | ||
64 | Keys.onEscapePressed: filterField.clearSearch() | ||
65 | } | ||
66 | } | ||
67 | } | ||
68 | Kube.MailListView { | ||
69 | id: mailListView | ||
70 | showFilter: false | ||
71 | Layout.fillWidth: true | ||
72 | Layout.fillHeight: true | ||
73 | } | ||
74 | } | ||
75 | Kube.ConversationView { | ||
76 | id: mailView | ||
77 | objectName: "mailView" | ||
78 | Layout.fillWidth: true | ||
79 | Layout.fillHeight: parent.height | ||
80 | activeFocusOnTab: true | ||
81 | mail: mailListView.currentMail | ||
36 | } | 82 | } |
37 | } | ||
38 | } | 83 | } |
39 | } | 84 | } |