summaryrefslogtreecommitdiffstats
path: root/framework/qml/MailViewer.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-24 04:19:01 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-24 04:19:01 +0200
commita253debf48c729a2e843cda327179629703cb4ed (patch)
tree43f285ef0d477cf40a15e039602f2f7f41d18fc0 /framework/qml/MailViewer.qml
parentfa790f59ec52b36ef4c25905073c3b0069deb08d (diff)
downloadkube-a253debf48c729a2e843cda327179629703cb4ed.tar.gz
kube-a253debf48c729a2e843cda327179629703cb4ed.zip
Use the TextButton
Diffstat (limited to 'framework/qml/MailViewer.qml')
-rw-r--r--framework/qml/MailViewer.qml16
1 files changed, 6 insertions, 10 deletions
diff --git a/framework/qml/MailViewer.qml b/framework/qml/MailViewer.qml
index 65e1e863..7104cc4a 100644
--- a/framework/qml/MailViewer.qml
+++ b/framework/qml/MailViewer.qml
@@ -347,7 +347,7 @@ Rectangle {
347 height: Kube.Units.gridUnit * 2 347 height: Kube.Units.gridUnit * 2
348 width: parent.width 348 width: parent.width
349 349
350 Kube.Label { 350 Kube.TextButton {
351 anchors{ 351 anchors{
352 verticalCenter: parent.verticalCenter 352 verticalCenter: parent.verticalCenter
353 left: parent.left 353 left: parent.left
@@ -356,15 +356,11 @@ Rectangle {
356 356
357 text: model.trash ? qsTr("Delete Mail") : qsTr("Move to trash") 357 text: model.trash ? qsTr("Delete Mail") : qsTr("Move to trash")
358 opacity: 0.5 358 opacity: 0.5
359 MouseArea { 359 onClicked: {
360 anchors.fill: parent 360 if (model.trash) {
361 enabled: parent.enabled 361 Kube.Fabric.postMessage(Kube.Messages.remove, {"mail": model.mail})
362 onClicked: { 362 } else {
363 if (model.trash) { 363 Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": model.mail})
364 Kube.Fabric.postMessage(Kube.Messages.remove, {"mail": model.mail})
365 } else {
366 Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": model.mail})
367 }
368 } 364 }
369 } 365 }
370 } 366 }