summaryrefslogtreecommitdiffstats
path: root/framework/qml
diff options
context:
space:
mode:
Diffstat (limited to 'framework/qml')
-rw-r--r--framework/qml/Icons.qml1
-rw-r--r--framework/qml/MailViewer.qml36
-rw-r--r--framework/qml/Messages.qml1
3 files changed, 28 insertions, 10 deletions
diff --git a/framework/qml/Icons.qml b/framework/qml/Icons.qml
index 3636a192..2afe840e 100644
--- a/framework/qml/Icons.qml
+++ b/framework/qml/Icons.qml
@@ -41,6 +41,7 @@ Item {
41 property string edit: "document-edit" 41 property string edit: "document-edit"
42 property string edit_inverted: "document-edit-inverted" 42 property string edit_inverted: "document-edit-inverted"
43 property string replyToSender: "mail-reply-sender" 43 property string replyToSender: "mail-reply-sender"
44 property string forward: "mail-forward"
44 property string outbox: "mail-folder-outbox" 45 property string outbox: "mail-folder-outbox"
45 property string outbox_inverted: "mail-folder-outbox-inverted" 46 property string outbox_inverted: "mail-folder-outbox-inverted"
46 property string copy: "edit-copy" 47 property string copy: "edit-copy"
diff --git a/framework/qml/MailViewer.qml b/framework/qml/MailViewer.qml
index 1a832470..f52e694d 100644
--- a/framework/qml/MailViewer.qml
+++ b/framework/qml/MailViewer.qml
@@ -370,24 +370,40 @@ Rectangle {
370 } 370 }
371 } 371 }
372 372
373 Kube.IconButton { 373 Grid {
374 visible: !model.trash 374 anchors {
375 anchors{
376 verticalCenter: parent.verticalCenter 375 verticalCenter: parent.verticalCenter
377 right: parent.right 376 right: parent.right
378 rightMargin: Kube.Units.largeSpacing 377 rightMargin: Kube.Units.largeSpacing
379 } 378 }
380 activeFocusOnTab: false 379 columns: 2
381 380
382 iconName: model.draft ? Kube.Icons.edit : Kube.Icons.replyToSender 381 Kube.IconButton {
383 onClicked: { 382 visible: !model.trash
384 if (model.draft) { 383 activeFocusOnTab: false
385 Kube.Fabric.postMessage(Kube.Messages.edit, {"mail": model.mail, "isDraft": model.draft}) 384
386 } else { 385 iconName: model.draft ? Kube.Icons.edit : Kube.Icons.replyToSender
387 Kube.Fabric.postMessage(Kube.Messages.reply, {"mail": model.mail, "isDraft": model.draft}) 386 onClicked: {
387 if (model.draft) {
388 Kube.Fabric.postMessage(Kube.Messages.edit, {"mail": model.mail})
389 } else {
390 Kube.Fabric.postMessage(Kube.Messages.reply, {"mail": model.mail})
391 }
388 } 392 }
389 } 393 }
394
395 Kube.IconButton {
396 visible: !model.trash && !model.draft
397 activeFocusOnTab: false
398
399 iconName: Kube.Icons.forward
400 onClicked: {
401 Kube.Fabric.postMessage(Kube.Messages.forward, {"mail": model.mail})
402 }
403 }
404
390 } 405 }
406
391 } 407 }
392 Rectangle { 408 Rectangle {
393 anchors.fill: parent 409 anchors.fill: parent
diff --git a/framework/qml/Messages.qml b/framework/qml/Messages.qml
index 18db51ff..9df83863 100644
--- a/framework/qml/Messages.qml
+++ b/framework/qml/Messages.qml
@@ -44,6 +44,7 @@ Item {
44 property string search: "search" 44 property string search: "search"
45 property string synchronize: "synchronize" 45 property string synchronize: "synchronize"
46 property string reply: "reply" 46 property string reply: "reply"
47 property string forward: "forward"
47 property string edit: "edit" 48 property string edit: "edit"
48 property string compose: "compose" 49 property string compose: "compose"
49 property string sendOutbox: "sendOutbox" 50 property string sendOutbox: "sendOutbox"