summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/mail/contents/ui/main.qml128
-rw-r--r--components/package/contents/ui/FolderListView.qml23
2 files changed, 77 insertions, 74 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml
index 1c51c9f1..72987d74 100644
--- a/components/mail/contents/ui/main.qml
+++ b/components/mail/contents/ui/main.qml
@@ -18,6 +18,7 @@
18import QtQuick 2.4 18import QtQuick 2.4
19import QtQuick.Controls 1.3 19import QtQuick.Controls 1.3
20import QtQuick.Layouts 1.1 20import QtQuick.Layouts 1.1
21import org.kde.kirigami 1.0 as Kirigami
21 22
22import org.kube.framework.actions 1.0 as KubeAction 23import org.kube.framework.actions 1.0 as KubeAction
23import org.kube.framework.settings 1.0 as KubeSettings 24import org.kube.framework.settings 1.0 as KubeSettings
@@ -64,45 +65,26 @@ ApplicationWindow {
64 context: folderListContext 65 context: folderListContext
65 } 66 }
66 67
67 //UI
68 toolBar: ToolBar {
69 68
70 Row { 69 ToolBar {
71 anchors.fill: parent 70 id: toolbar
72 71
73 ToolButton { 72 anchors {
74 height: parent.height 73 top: app.top
75 text: "Settings" 74 left: app.left
76 onClicked: { 75 }
77 settingsComponent.createObject(app)
78 }
79 Component {
80 id: settingsComponent
81 KubeComponents.Settings {
82 id: settings
83 anchors.fill: parent
84 }
85 }
86 }
87 76
88 ToolButton { 77 height: Kirigami.Units.iconSizes.medium
89 height: parent.height 78 width: app.width
90 iconName: "mail-message-new"
91 text: "Compose"
92 onClicked: {
93 composerComponent.createObject(app)
94 }
95 }
96 79
97 ToolButton { 80
98 height: parent.height 81 Row {
99 iconName: "mail-message-reply" 82 anchors {
100 text: "Reply" 83 left: parent.left
101 onClicked: { 84 top: parent.top
102 composerComponent.createObject(app) 85 bottom: parent.bottom
103 composer.originalMessage = mailListView.currentMail
104 }
105 } 86 }
87
106 Component { 88 Component {
107 id: composerComponent 89 id: composerComponent
108 KubeComponents.FocusComposer { 90 KubeComponents.FocusComposer {
@@ -113,6 +95,16 @@ ApplicationWindow {
113 95
114 ToolButton { 96 ToolButton {
115 height: parent.height 97 height: parent.height
98 iconName: "view-refresh"
99 text: "Sync"
100 enabled: syncAction.ready
101 onClicked: {
102 syncAction.execute()
103 }
104 }
105
106 ToolButton {
107 height: parent.height
116 iconName: "mail-mark-unread" 108 iconName: "mail-mark-unread"
117 text: "Mark As Read" 109 text: "Mark As Read"
118 enabled: markAsReadAction.ready 110 enabled: markAsReadAction.ready
@@ -142,39 +134,69 @@ ApplicationWindow {
142 134
143 ToolButton { 135 ToolButton {
144 height: parent.height 136 height: parent.height
145 iconName: "view-refresh" 137 iconName: "mail-message-new"
146 text: "Sync" 138 text: "Compose"
147 enabled: syncAction.ready
148 onClicked: { 139 onClicked: {
149 syncAction.execute() 140 composerComponent.createObject(app)
150 } 141 }
151 } 142 }
152 143
144 ToolButton {
145 height: parent.height
146 iconName: "mail-message-reply"
147 text: "Reply"
148 onClicked: {
149 composerComponent.createObject(app)
150 composer.originalMessage = mailListView.currentMail
151 }
152 }
153 } 153 }
154 Rectangle { 154
155 RowLayout {
155 anchors { 156 anchors {
156 right: parent.right 157 right: parent.right
158 verticalCenter: parent.verticalCenter
157 } 159 }
158 height: parent.height 160
159 color: "transparent" 161 width: Kirigami.Units.gridUnit * 40
160 Image { 162 height: Kirigami.Units.iconSizes.medium
161 id: img 163
162 height: parent.height 164 TextField {
163 fillMode: Image.PreserveAspectCrop 165
164 anchors { 166 Layout.fillWidth: true
165 verticalCenter: parent.verticalCenter 167
166 left: parent.left 168 placeholderText: "Search..."
167 leftMargin: -20 169 }
170
171 ToolButton {
172
173 height: Kirigami.Units.iconSizes.medium
174
175 iconName: "application-menu"
176 text: "Settings"
177
178 onClicked: {
179 settingsComponent.createObject(app)
180 }
181 Component {
182 id: settingsComponent
183 KubeComponents.Settings {
184 id: settings
185 anchors.fill: parent
186 }
168 } 187 }
169 source: "image://kube/kube_logo"
170 sourceSize.height: parent.height * 2.5
171 } 188 }
172 width: img.width * 0.7
173 } 189 }
174 } 190 }
175 191
176 SplitView { 192 SplitView {
177 anchors.fill: parent 193 anchors {
194 top: toolbar.bottom
195 left: app.left
196 }
197
198 height: app.height - toolbar.height
199 width: app.width
178 200
179 KubeComponents.FolderListView { 201 KubeComponents.FolderListView {
180 id: folderListView 202 id: folderListView
diff --git a/components/package/contents/ui/FolderListView.qml b/components/package/contents/ui/FolderListView.qml
index e41220f5..62960fb9 100644
--- a/components/package/contents/ui/FolderListView.qml
+++ b/components/package/contents/ui/FolderListView.qml
@@ -30,28 +30,9 @@ Item {
30 property variant currentFolder 30 property variant currentFolder
31 SystemPalette { id: colorPalette; colorGroup: SystemPalette.Active } 31 SystemPalette { id: colorPalette; colorGroup: SystemPalette.Active }
32 32
33 Item {
34 id: searchBox
35
36 width: root.width
37 height: Unit.size * 10
38
39 TextField {
40 anchors. centerIn: parent
41
42 width: parent.width * 0.9
43
44 placeholderText: "Search all email..."
45 }
46 }
47
48 Rectangle { 33 Rectangle {
49 anchors { 34 anchors.fill: parent
50 top: searchBox.bottom 35
51 left: parent.left
52 right: parent.right
53 bottom: parent.bottom
54 }
55 color: "white" 36 color: "white"
56 ScrollView { 37 ScrollView {
57 anchors.fill: parent 38 anchors.fill: parent