summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-02 15:29:12 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-02 15:29:12 +0200
commitd2b8c06df6d860a529bb37f5e6f4516d31f86fc2 (patch)
tree2e65f0b409367313f06b136f3138bb78c1c58068
parentd3addd8b9988d4e313b40b09588025097049944a (diff)
downloadkube-d2b8c06df6d860a529bb37f5e6f4516d31f86fc2.tar.gz
kube-d2b8c06df6d860a529bb37f5e6f4516d31f86fc2.zip
prepared composer in stacklayout, brought back statusbar
-rw-r--r--components/kube/contents/ui/Kube.qml25
-rw-r--r--components/kube/contents/ui/MailView.qml64
-rw-r--r--components/kube/contents/ui/PeopleView.qml15
-rw-r--r--framework/qml/FocusComposer.qml27
-rw-r--r--framework/qml/Messages.qml1
5 files changed, 70 insertions, 62 deletions
diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml
index bf7d987a..2d2ff4f5 100644
--- a/components/kube/contents/ui/Kube.qml
+++ b/components/kube/contents/ui/Kube.qml
@@ -61,11 +61,11 @@ Controls2.ApplicationWindow {
61 } 61 }
62 } 62 }
63 63
64 64 Kube.Listener {
65 //Model 65 filter: Kube.Messages.compose
66 Kube.AccountsModel { 66 onMessageReceived: {
67 id: currentAccountModel 67 composer.open()
68 accountId: accountFolderview.accountId 68 }
69 } 69 }
70 70
71 //BEGIN Shortcuts 71 //BEGIN Shortcuts
@@ -171,19 +171,28 @@ Controls2.ApplicationWindow {
171 PeopleView { 171 PeopleView {
172 id: peopleView 172 id: peopleView
173 } 173 }
174 ComposerView {
175 id: composerView
176 }
174 } 177 }
175 } 178 }
176 //END Main content 179 //END Main content
177 180
178 //BEGIN Composer 181 //BEGIN Composer
179 Kube.FocusComposer { 182 Kube.Popup {
180 id: composer
181
182 height: app.height * 0.85 183 height: app.height * 0.85
183 width: app.width * 0.85 184 width: app.width * 0.85
184 185
185 x: app.width * 0.075 186 x: app.width * 0.075
186 y: app.height * 0.075 187 y: app.height * 0.075
188
189 //Don't close the composer due to an accidental click outside
190 closePolicy: Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutsideParent
191
192 Kube.FocusComposer {
193 id: composer
194 anchors.fill: parent
195 }
187 } 196 }
188 //END Composer 197 //END Composer
189 198
diff --git a/components/kube/contents/ui/MailView.qml b/components/kube/contents/ui/MailView.qml
index b23dd06a..b579ff27 100644
--- a/components/kube/contents/ui/MailView.qml
+++ b/components/kube/contents/ui/MailView.qml
@@ -25,8 +25,6 @@ import QtQuick.Layouts 1.1
25import org.kube.framework 1.0 as Kube 25import org.kube.framework 1.0 as Kube
26 26
27SplitView { 27SplitView {
28 Layout.fillWidth: true
29
30 Rectangle { 28 Rectangle {
31 width: Kube.Units.gridUnit * 10 29 width: Kube.Units.gridUnit * 10
32 Layout.minimumWidth: Kube.Units.gridUnit * 5 30 Layout.minimumWidth: Kube.Units.gridUnit * 5
@@ -47,7 +45,7 @@ SplitView {
47 text: qsTr("New Email") 45 text: qsTr("New Email")
48 46
49 onClicked: { 47 onClicked: {
50 composer.open() 48 Kube.Fabric.postMessage(Kube.Messages.compose, {})
51 } 49 }
52 } 50 }
53 51
@@ -63,36 +61,38 @@ SplitView {
63 right: parent.right 61 right: parent.right
64 } 62 }
65 } 63 }
66 }
67 64
68//TODO bring back status bar 65 Item {
69// Item { 66 id: statusBar
70// id: statusBar 67 anchors {
71// anchors { 68 topMargin: Kube.Units.smallSpacing
72// topMargin: Kube.Units.smallSpacing 69 bottom: parent.bottom
73// bottom: outbox.top 70 left: parent.left
74// left: parent.left 71 right: parent.right
75// right: parent.right 72 }
76// } 73
77// 74 height: Kube.Units.gridUnit
78// height: Kube.Units.gridUnit 75
79// 76 Repeater {
80// Repeater { 77 model: Kube.AccountsModel {
81// model: currentAccountModel 78 accountId: accountFolderview.accountId
82// Kube.Label { 79 }
83// id: statusText 80
84// anchors.centerIn: parent 81 Kube.Label {
85// visible: false 82 id: statusText
86// color: Kube.Colors.highlightedTextColor 83 anchors.centerIn: parent
87// states: [ 84 visible: false
88// State { 85 color: Kube.Colors.highlightedTextColor
89// name: "disconnected"; when: model.status == Kube.AccountsModel.OfflineStatus 86 states: [
90// PropertyChanges { target: statusText; text: "Offline"; visible: true } 87 State {
91// } 88 name: "disconnected"; when: model.status == Kube.AccountsModel.OfflineStatus
92// ] 89 PropertyChanges { target: statusText; text: "Offline"; visible: true }
93// } 90 }
94// } 91 ]
95// } 92 }
93 }
94 }
95 }
96 96
97 Kube.MailListView { 97 Kube.MailListView {
98 id: mailListView 98 id: mailListView
diff --git a/components/kube/contents/ui/PeopleView.qml b/components/kube/contents/ui/PeopleView.qml
index 8d7a9fbd..19c7c60d 100644
--- a/components/kube/contents/ui/PeopleView.qml
+++ b/components/kube/contents/ui/PeopleView.qml
@@ -19,13 +19,14 @@
19 19
20 20
21import QtQuick 2.7 21import QtQuick 2.7
22import QtQuick.Controls 1.3
23import QtQuick.Layouts 1.1
24
25import org.kube.framework 1.0 as Kube 22import org.kube.framework 1.0 as Kube
26 23
27Kube.People { 24Item {
28 id: people 25 Kube.People {
29 26 id: people
30 Layout.fillWidth: true 27 anchors {
28 fill: parent
29 margins: Kube.Units.smallSpacing
30 }
31 }
31} 32}
diff --git a/framework/qml/FocusComposer.qml b/framework/qml/FocusComposer.qml
index 7330b236..a3bad1c9 100644
--- a/framework/qml/FocusComposer.qml
+++ b/framework/qml/FocusComposer.qml
@@ -20,11 +20,10 @@ import QtQuick 2.4
20import QtQuick.Layouts 1.1 20import QtQuick.Layouts 1.1
21import QtQuick.Controls 2.0 as Controls2 21import QtQuick.Controls 2.0 as Controls2
22 22
23import org.kde.kirigami 1.0 as Kirigami
24import org.kube.framework 1.0 as Kube 23import org.kube.framework 1.0 as Kube
25 24
26 25
27Kube.Popup { 26Item {
28 id: root 27 id: root
29 28
30 //Controller 29 //Controller
@@ -32,7 +31,6 @@ Kube.Popup {
32 id: composerController 31 id: composerController
33 onDone: { 32 onDone: {
34 clear(); 33 clear();
35 root.close()
36 } 34 }
37 } 35 }
38 36
@@ -40,14 +38,15 @@ Kube.Popup {
40 property variant sendAction: composerController.sendAction 38 property variant sendAction: composerController.sendAction
41 property variant saveAsDraftAction: composerController.saveAsDraftAction 39 property variant saveAsDraftAction: composerController.saveAsDraftAction
42 40
43 onClosed: { 41 //FIXME
44 composerController.clear() 42 // onClosed: {
45 to.text = "" 43 // composerController.clear()
46 cc.visible = false 44 // to.text = ""
47 cc.text = "" 45 // cc.visible = false
48 bcc.visible = false 46 // cc.text = ""
49 bcc.text = "" 47 // bcc.visible = false
50 } 48 // bcc.text = ""
49 // }
51 50
52 //BEGIN functions 51 //BEGIN functions
53 function loadMessage(message, loadAsDraft) { 52 function loadMessage(message, loadAsDraft) {
@@ -55,9 +54,6 @@ Kube.Popup {
55 } 54 }
56 //END functions 55 //END functions
57 56
58 //Don't close the composer due to an accidental click outside
59 closePolicy: Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutsideParent
60
61 Item { 57 Item {
62 58
63 height: parent.height 59 height: parent.height
@@ -226,7 +222,8 @@ Kube.Popup {
226 text: "Discard" 222 text: "Discard"
227 223
228 onClicked: { 224 onClicked: {
229 root.close() 225 //FIXME
226 // root.close()
230 } 227 }
231 } 228 }
232 229
diff --git a/framework/qml/Messages.qml b/framework/qml/Messages.qml
index 26a3ea3e..a6ca6fe0 100644
--- a/framework/qml/Messages.qml
+++ b/framework/qml/Messages.qml
@@ -39,5 +39,6 @@ Item {
39 property string synchronize: "synchronize" 39 property string synchronize: "synchronize"
40 property string reply: "reply" 40 property string reply: "reply"
41 property string edit: "edit" 41 property string edit: "edit"
42 property string compose: "compose"
42} 43}
43 44