summaryrefslogtreecommitdiffstats
path: root/components
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 /components
parentd3addd8b9988d4e313b40b09588025097049944a (diff)
downloadkube-d2b8c06df6d860a529bb37f5e6f4516d31f86fc2.tar.gz
kube-d2b8c06df6d860a529bb37f5e6f4516d31f86fc2.zip
prepared composer in stacklayout, brought back statusbar
Diffstat (limited to 'components')
-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
3 files changed, 57 insertions, 47 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}