summaryrefslogtreecommitdiffstats
path: root/framework/qml/MailListView.qml
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2017-04-21 17:26:21 +0200
committerMichael Bohlender <michael.bohlender@kdemail.net>2017-04-21 17:26:21 +0200
commitbd001d8b69846c8a7e5e82df899afa0d9c76172d (patch)
tree93973452266fdba2b184161cc171777332484202 /framework/qml/MailListView.qml
parent40d51446dec55d72fd88537bab570fbcc6cb69f7 (diff)
downloadkube-bd001d8b69846c8a7e5e82df899afa0d9c76172d.tar.gz
kube-bd001d8b69846c8a7e5e82df899afa0d9c76172d.zip
remove toolbar and move enable the buttons in the mailListDelegate
Diffstat (limited to 'framework/qml/MailListView.qml')
-rw-r--r--framework/qml/MailListView.qml112
1 files changed, 37 insertions, 75 deletions
diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml
index a662f5c8..96e266bb 100644
--- a/framework/qml/MailListView.qml
+++ b/framework/qml/MailListView.qml
@@ -66,71 +66,6 @@ Item {
66 onActivated: root.currentIndex-- 66 onActivated: root.currentIndex--
67 } 67 }
68 68
69 ToolBar {
70 id: toolbar
71
72 width: parent.width
73
74 Row {
75 anchors.centerIn: parent
76
77 spacing: Kube.Units.smallSpacing
78
79 Controls.ToolButton {
80 iconName: Kube.Icons.markAsRead
81 text: qsTr("Mark As Read")
82 tooltip: text
83 enabled: mailController.markAsReadAction.enabled
84 visible: enabled
85 onClicked: {
86 mailController.markAsReadAction.execute()
87 }
88 }
89
90 Controls.ToolButton {
91 iconName: Kube.Icons.markAsUnread
92 text: qsTr("Mark As Unread")
93 tooltip: text
94 enabled: mailController.markAsUnreadAction.enabled
95 visible: enabled
96 onClicked: {
97 mailController.markAsUnreadAction.execute()
98 }
99 }
100
101 Controls.ToolButton {
102 iconName: Kube.Icons.markImportant
103 text: qsTr("Toggle Important")
104 tooltip: text
105 enabled: mailController.toggleImportantAction.enabled
106 onClicked: {
107 mailController.toggleImportantAction.execute()
108 }
109 }
110
111 Controls.ToolButton {
112 iconName: Kube.Icons.moveToTrash
113 text: qsTr("Delete Mail")
114 tooltip: text
115 enabled: mailController.moveToTrashAction.enabled
116 onClicked: {
117 mailController.moveToTrashAction.execute()
118 }
119 }
120
121 Controls.ToolButton {
122 iconName: Kube.Icons.undo
123 text: qsTr("Restore Mail")
124 tooltip: text
125 enabled: mailController.restoreFromTrashAction.enabled
126 visible: enabled
127 onClicked: {
128 mailController.restoreFromTrashAction.execute()
129 }
130 }
131 }
132 }
133
134 Kube.Label { 69 Kube.Label {
135 anchors.centerIn: parent 70 anchors.centerIn: parent
136 visible: listView.count === 0 71 visible: listView.count === 0
@@ -141,11 +76,7 @@ Item {
141 ListView { 76 ListView {
142 id: listView 77 id: listView
143 78
144 anchors.top: toolbar.bottom 79 anchors.fill: parent
145
146 width: parent.width
147 height: parent.height - toolbar.height
148
149 focus: true 80 focus: true
150 clip: true 81 clip: true
151 82
@@ -227,9 +158,8 @@ Item {
227 PropertyChanges {target: background; color: Kube.Colors.highlightColor; opacity: 0.6} 158 PropertyChanges {target: background; color: Kube.Colors.highlightColor; opacity: 0.6}
228 PropertyChanges {target: subject; color: Kube.Colors.highlightedTextColor} 159 PropertyChanges {target: subject; color: Kube.Colors.highlightedTextColor}
229 PropertyChanges {target: sender; color: Kube.Colors.highlightedTextColor} 160 PropertyChanges {target: sender; color: Kube.Colors.highlightedTextColor}
230 PropertyChanges {target: date; visible: false} 161 PropertyChanges {target: date; color: Kube.Colors.highlightedTextColor}
231 PropertyChanges {target: threadCounter; color: Kube.Colors.highlightedTextColor} 162 PropertyChanges {target: threadCounter; color: Kube.Colors.highlightedTextColor}
232 PropertyChanges {target: buttons; visible: true}
233 } 163 }
234 ] 164 ]
235 165
@@ -331,7 +261,7 @@ Item {
331 Row { 261 Row {
332 id: buttons 262 id: buttons
333 263
334 property bool containsMouse: importantButton.hovered || deleteButton.hovered || unreadButton.hovered 264 property bool containsMouse: importantButton.hovered || deleteButton.hovered || unreadButton.hovered || readButton.hovered
335 265
336 anchors { 266 anchors {
337 right: parent.right 267 right: parent.right
@@ -344,20 +274,52 @@ Item {
344 opacity: 0.7 274 opacity: 0.7
345 275
346 Kube.Button { 276 Kube.Button {
277 id: readButton
278 text: "r"
279 enabled: mailController.markAsReadAction.enabled
280 visible: enabled
281 onClicked: {
282 mailController.markAsReadAction.execute()
283 }
284 }
285 Kube.Button {
347 id: unreadButton 286 id: unreadButton
348
349 text: "u" 287 text: "u"
288 enabled: mailController.markAsUnreadAction.enabled
289 visible: enabled
290 onClicked: {
291 mailController.markAsUnreadAction.execute()
292 }
350 } 293 }
351 294
352 Kube.Button { 295 Kube.Button {
353 id: importantButton 296 id: importantButton
354
355 text: "i" 297 text: "i"
298 enabled: mailController.toggleImportantAction.enabled
299 visible: enabled
300 onClicked: {
301 mailController.toggleImportantAction.execute()
302 }
356 } 303 }
357 304
358 Kube.Button { 305 Kube.Button {
359 id: deleteButton 306 id: deleteButton
360 text: "d" 307 text: "d"
308 enabled: mailController.moveToTrashAction.enabled
309 visible: enabled
310 onClicked: {
311 mailController.moveToTrashAction.execute()
312 }
313 }
314
315 Kube.Button {
316 id: restoreButton
317 text: "re"
318 enabled: mailController.restoreFromTrashAction.enabled
319 visible: enabled
320 onClicked: {
321 mailController.restoreFromTrashAction.execute()
322 }
361 } 323 }
362 } 324 }
363 } 325 }