summaryrefslogtreecommitdiffstats
path: root/framework/qml/MailListView.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-05 13:00:21 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-05 13:00:21 +0200
commit5755ad47145d2985ba74354961b4127d82c516f6 (patch)
treeaa6af562b7e587be895ff5a4355270f82f3ea180 /framework/qml/MailListView.qml
parente78224a7d9ccf70aadde8c0bff1cab72e8cb7438 (diff)
downloadkube-5755ad47145d2985ba74354961b4127d82c516f6.tar.gz
kube-5755ad47145d2985ba74354961b4127d82c516f6.zip
A single framework plugin
Diffstat (limited to 'framework/qml/MailListView.qml')
-rw-r--r--framework/qml/MailListView.qml67
1 files changed, 33 insertions, 34 deletions
diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml
index 2d5d6601..28386442 100644
--- a/framework/qml/MailListView.qml
+++ b/framework/qml/MailListView.qml
@@ -21,8 +21,7 @@ import QtQuick.Controls 2.0
21import QtQuick.Controls 1.4 as Controls 21import QtQuick.Controls 1.4 as Controls
22import QtQuick.Layouts 1.1 22import QtQuick.Layouts 1.1
23 23
24import org.kube.components.theme 1.0 as KubeTheme 24import org.kube.framework 1.0 as Kube
25import org.kube.framework.domain 1.0 as KubeFramework
26 25
27Item { 26Item {
28 id: root 27 id: root
@@ -44,10 +43,10 @@ Item {
44 Row { 43 Row {
45 anchors.centerIn: parent 44 anchors.centerIn: parent
46 45
47 spacing: KubeTheme.Units.smallSpacing 46 spacing: Kube.Units.smallSpacing
48 47
49 Controls.ToolButton { 48 Controls.ToolButton {
50 iconName: KubeTheme.Icons.markAsRead 49 iconName: Kube.Icons.markAsRead
51 text: qsTr("Mark As Read") 50 text: qsTr("Mark As Read")
52 enabled: mailController.markAsReadAction.enabled 51 enabled: mailController.markAsReadAction.enabled
53 tooltip: qsTr("mark mail as read") 52 tooltip: qsTr("mark mail as read")
@@ -57,7 +56,7 @@ Item {
57 } 56 }
58 57
59 Controls.ToolButton { 58 Controls.ToolButton {
60 iconName: KubeTheme.Icons.markImportant 59 iconName: Kube.Icons.markImportant
61 text: qsTr("Mark Important") 60 text: qsTr("Mark Important")
62 enabled: mailController.markAsImportantAction.enabled 61 enabled: mailController.markAsImportantAction.enabled
63 tooltip: qsTr("mark mail as important") 62 tooltip: qsTr("mark mail as important")
@@ -67,7 +66,7 @@ Item {
67 } 66 }
68 67
69 Controls.ToolButton { 68 Controls.ToolButton {
70 iconName: KubeTheme.Icons.moveToTrash 69 iconName: Kube.Icons.moveToTrash
71 text: qsTr("Delete Mail") 70 text: qsTr("Delete Mail")
72 enabled: mailController.moveToTrashAction.enabled 71 enabled: mailController.moveToTrashAction.enabled
73 tooltip: qsTr("delete email") 72 tooltip: qsTr("delete email")
@@ -77,7 +76,7 @@ Item {
77 } 76 }
78 77
79 Controls.ToolButton { 78 Controls.ToolButton {
80 iconName: KubeTheme.Icons.undo 79 iconName: Kube.Icons.undo
81 text: qsTr("Restore Mail") 80 text: qsTr("Restore Mail")
82 enabled: mailController.restoreFromTrashAction.enabled 81 enabled: mailController.restoreFromTrashAction.enabled
83 tooltip: qsTr("restore email") 82 tooltip: qsTr("restore email")
@@ -132,7 +131,7 @@ Item {
132 root.isDraft = currentItem.currentData.draft; 131 root.isDraft = currentItem.currentData.draft;
133 } 132 }
134 133
135 model: KubeFramework.MailListModel { 134 model: Kube.MailListModel {
136 parentFolder: root.parentFolder 135 parentFolder: root.parentFolder
137 filter: root.filterString 136 filter: root.filterString
138 } 137 }
@@ -151,7 +150,7 @@ Item {
151 property variant mail : model.domainObject 150 property variant mail : model.domainObject
152 151
153 width: scrollbar.visible ? listView.width - scrollbar.width : listView.width 152 width: scrollbar.visible ? listView.width - scrollbar.width : listView.width
154 height: KubeTheme.Units.gridUnit * 5 153 height: Kube.Units.gridUnit * 5
155 154
156 states: [ 155 states: [
157 State { 156 State {
@@ -163,31 +162,31 @@ Item {
163 PropertyChanges {target: delegateRoot; parent: root} 162 PropertyChanges {target: delegateRoot; parent: root}
164 163
165 PropertyChanges {target: delegateRoot; opacity: 0.7} 164 PropertyChanges {target: delegateRoot; opacity: 0.7}
166 PropertyChanges {target: background; color: KubeTheme.Colors.highlightColor} 165 PropertyChanges {target: background; color: Kube.Colors.highlightColor}
167 PropertyChanges {target: subject; color: KubeTheme.Colors.highlightedTextColor} 166 PropertyChanges {target: subject; color: Kube.Colors.highlightedTextColor}
168 PropertyChanges {target: sender; color: KubeTheme.Colors.highlightedTextColor} 167 PropertyChanges {target: sender; color: Kube.Colors.highlightedTextColor}
169 PropertyChanges {target: date; color: KubeTheme.Colors.highlightedTextColor} 168 PropertyChanges {target: date; color: Kube.Colors.highlightedTextColor}
170 PropertyChanges {target: threadCounter; color: KubeTheme.Colors.highlightedTextColor} 169 PropertyChanges {target: threadCounter; color: Kube.Colors.highlightedTextColor}
171 }, 170 },
172 State { 171 State {
173 name: "selected" 172 name: "selected"
174 when: listView.currentIndex == index && !mouseArea.drag.active 173 when: listView.currentIndex == index && !mouseArea.drag.active
175 174
176 PropertyChanges {target: background; color: KubeTheme.Colors.highlightColor} 175 PropertyChanges {target: background; color: Kube.Colors.highlightColor}
177 PropertyChanges {target: subject; color: KubeTheme.Colors.highlightedTextColor} 176 PropertyChanges {target: subject; color: Kube.Colors.highlightedTextColor}
178 PropertyChanges {target: sender; color: KubeTheme.Colors.highlightedTextColor} 177 PropertyChanges {target: sender; color: Kube.Colors.highlightedTextColor}
179 PropertyChanges {target: date; color: KubeTheme.Colors.highlightedTextColor} 178 PropertyChanges {target: date; color: Kube.Colors.highlightedTextColor}
180 PropertyChanges {target: threadCounter; color: KubeTheme.Colors.highlightedTextColor} 179 PropertyChanges {target: threadCounter; color: Kube.Colors.highlightedTextColor}
181 }, 180 },
182 State { 181 State {
183 name: "hovered" 182 name: "hovered"
184 when: mouseArea.containsMouse && !mouseArea.drag.active 183 when: mouseArea.containsMouse && !mouseArea.drag.active
185 184
186 PropertyChanges {target: background; color: KubeTheme.Colors.highlightColor; opacity: 0.7} 185 PropertyChanges {target: background; color: Kube.Colors.highlightColor; opacity: 0.7}
187 PropertyChanges {target: subject; color: KubeTheme.Colors.highlightedTextColor} 186 PropertyChanges {target: subject; color: Kube.Colors.highlightedTextColor}
188 PropertyChanges {target: sender; color: KubeTheme.Colors.highlightedTextColor} 187 PropertyChanges {target: sender; color: Kube.Colors.highlightedTextColor}
189 PropertyChanges {target: date; color: KubeTheme.Colors.highlightedTextColor} 188 PropertyChanges {target: date; color: Kube.Colors.highlightedTextColor}
190 PropertyChanges {target: threadCounter; color: KubeTheme.Colors.highlightedTextColor} 189 PropertyChanges {target: threadCounter; color: Kube.Colors.highlightedTextColor}
191 } 190 }
192 ] 191 ]
193 192
@@ -215,9 +214,9 @@ Item {
215 214
216 anchors.fill: parent 215 anchors.fill: parent
217 216
218 color: KubeTheme.Colors.viewBackgroundColor 217 color: Kube.Colors.viewBackgroundColor
219 218
220 border.color: KubeTheme.Colors.backgroundColor 219 border.color: Kube.Colors.backgroundColor
221 border.width: 1 220 border.width: 1
222 } 221 }
223 222
@@ -229,24 +228,24 @@ Item {
229 bottom: parent.bottom 228 bottom: parent.bottom
230 left: parent.left 229 left: parent.left
231 right: parent.right 230 right: parent.right
232 margins: KubeTheme.Units.smallSpacing 231 margins: Kube.Units.smallSpacing
233 } 232 }
234 233
235 Column { 234 Column {
236 anchors { 235 anchors {
237 verticalCenter: parent.verticalCenter 236 verticalCenter: parent.verticalCenter
238 left: parent.left 237 left: parent.left
239 leftMargin: KubeTheme.Units.largeSpacing 238 leftMargin: Kube.Units.largeSpacing
240 } 239 }
241 240
242 Text{ 241 Text{
243 id: subject 242 id: subject
244 243
245 text: model.subject 244 text: model.subject
246 color: model.unread ? KubeTheme.Colors.highlightColor : KubeTheme.Colors.textColor 245 color: model.unread ? Kube.Colors.highlightColor : Kube.Colors.textColor
247 246
248 maximumLineCount: 2 247 maximumLineCount: 2
249 width: content.width - KubeTheme.Units.gridUnit * 3 248 width: content.width - Kube.Units.gridUnit * 3
250 wrapMode: Text.WrapAnywhere 249 wrapMode: Text.WrapAnywhere
251 elide: Text.ElideRight 250 elide: Text.ElideRight
252 } 251 }
@@ -256,8 +255,8 @@ Item {
256 255
257 text: model.senderName 256 text: model.senderName
258 font.italic: true 257 font.italic: true
259 color: KubeTheme.Colors.textColor 258 color: Kube.Colors.textColor
260 width: delegateRoot.width - KubeTheme.Units.gridUnit * 3 259 width: delegateRoot.width - Kube.Units.gridUnit * 3
261 elide: Text.ElideRight 260 elide: Text.ElideRight
262 } 261 }
263 } 262 }
@@ -271,7 +270,7 @@ Item {
271 } 270 }
272 text: Qt.formatDateTime(model.date, "dd MMM yyyy") 271 text: Qt.formatDateTime(model.date, "dd MMM yyyy")
273 font.italic: true 272 font.italic: true
274 color: KubeTheme.Colors.disabledTextColor 273 color: Kube.Colors.disabledTextColor
275 font.pointSize: 9 274 font.pointSize: 9
276 } 275 }
277 276
@@ -282,7 +281,7 @@ Item {
282 right: parent.right 281 right: parent.right
283 } 282 }
284 text: model.threadSize 283 text: model.threadSize
285 color: model.unread ? KubeTheme.Colors.highlightColor : KubeTheme.Colors.disabledTextColor 284 color: model.unread ? Kube.Colors.highlightColor : Kube.Colors.disabledTextColor
286 visible: model.threadSize > 1 285 visible: model.threadSize > 1
287 } 286 }
288 } 287 }