diff options
Diffstat (limited to 'views/conversation/qml/View.qml')
-rw-r--r-- | views/conversation/qml/View.qml | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/views/conversation/qml/View.qml b/views/conversation/qml/View.qml new file mode 100644 index 00000000..8b2b0caf --- /dev/null +++ b/views/conversation/qml/View.qml | |||
@@ -0,0 +1,120 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2017 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | * Copyright (C) 2017 Christian Mollekopf, <mollekopf@kolabsys.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along | ||
16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | |||
21 | import QtQuick 2.7 | ||
22 | import QtQuick.Controls 1.3 | ||
23 | import QtQuick.Controls 2.0 as Controls2 | ||
24 | import QtQuick.Layouts 1.1 | ||
25 | |||
26 | import org.kube.framework 1.0 as Kube | ||
27 | |||
28 | FocusScope { | ||
29 | SplitView { | ||
30 | anchors.fill: parent | ||
31 | Rectangle { | ||
32 | width: Kube.Units.gridUnit * 10 | ||
33 | Layout.fillHeight: parent.height | ||
34 | color: Kube.Colors.textColor | ||
35 | |||
36 | Kube.PositiveButton { | ||
37 | id: newMailButton | ||
38 | |||
39 | anchors { | ||
40 | top: parent.top | ||
41 | left: parent.left | ||
42 | right: parent.right | ||
43 | margins: Kube.Units.largeSpacing | ||
44 | } | ||
45 | focus: true | ||
46 | text: qsTr("New Email") | ||
47 | onClicked: Kube.Fabric.postMessage(Kube.Messages.compose, {}) | ||
48 | } | ||
49 | |||
50 | Kube.InlineAccountSwitcher { | ||
51 | id: accountFolderview | ||
52 | activeFocusOnTab: true | ||
53 | anchors { | ||
54 | top: newMailButton.bottom | ||
55 | topMargin: Kube.Units.largeSpacing | ||
56 | bottom: statusBarContainer.top | ||
57 | left: newMailButton.left | ||
58 | right: parent.right | ||
59 | } | ||
60 | } | ||
61 | |||
62 | Item { | ||
63 | id: statusBarContainer | ||
64 | anchors { | ||
65 | topMargin: Kube.Units.smallSpacing | ||
66 | bottom: parent.bottom | ||
67 | left: parent.left | ||
68 | right: parent.right | ||
69 | } | ||
70 | height: childrenRect.height | ||
71 | |||
72 | Rectangle { | ||
73 | id: border | ||
74 | visible: statusBar.visible | ||
75 | anchors { | ||
76 | right: parent.right | ||
77 | left: parent.left | ||
78 | margins: Kube.Units.smallSpacing | ||
79 | } | ||
80 | height: 1 | ||
81 | color: Kube.Colors.viewBackgroundColor | ||
82 | opacity: 0.3 | ||
83 | } | ||
84 | Kube.StatusBar { | ||
85 | id: statusBar | ||
86 | accountId: accountFolderview.currentAccount | ||
87 | height: Kube.Units.gridUnit * 2 | ||
88 | anchors { | ||
89 | top: border.bottom | ||
90 | left: statusBarContainer.left | ||
91 | right: statusBarContainer.right | ||
92 | } | ||
93 | } | ||
94 | } | ||
95 | } | ||
96 | |||
97 | Rectangle { | ||
98 | width: Kube.Units.gridUnit * 18 | ||
99 | Layout.fillHeight: parent.height | ||
100 | |||
101 | color: "transparent" | ||
102 | border.width: 1 | ||
103 | border.color: Kube.Colors.buttonColor | ||
104 | |||
105 | Kube.MailListView { | ||
106 | id: mailListView | ||
107 | anchors.fill: parent | ||
108 | activeFocusOnTab: true | ||
109 | Layout.minimumWidth: Kube.Units.gridUnit * 10 | ||
110 | } | ||
111 | } | ||
112 | |||
113 | Kube.ConversationView { | ||
114 | id: mailView | ||
115 | Layout.fillWidth: true | ||
116 | Layout.fillHeight: parent.height | ||
117 | activeFocusOnTab: true | ||
118 | } | ||
119 | } | ||
120 | } | ||