From 4106162feb2c7af0c0fec6477c5068a1fcb10fae Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 14 Jun 2017 15:38:25 +0200 Subject: Remove button --- framework/qml/AttachmentDelegate.qml | 11 ++++++----- framework/qml/Icons.qml | 1 + framework/qml/MailViewer.qml | 10 ++++------ 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'framework') diff --git a/framework/qml/AttachmentDelegate.qml b/framework/qml/AttachmentDelegate.qml index 46cf76f9..2167fa12 100644 --- a/framework/qml/AttachmentDelegate.qml +++ b/framework/qml/AttachmentDelegate.qml @@ -24,8 +24,9 @@ Item { property string name property string icon - signal open; - signal download; + property alias actionIcon: actionButton.iconName + signal clicked; + signal execute; width: content.width + Kube.Units.smallSpacing height: content.height + Kube.Units.smallSpacing @@ -40,7 +41,7 @@ Item { MouseArea { anchors.fill: parent - onClicked: root.open() + onClicked: root.clicked() } Row { @@ -59,10 +60,10 @@ Item { color: Kube.Colors.backgroundColor } Kube.IconButton { + id: actionButton height: Kube.Units.gridUnit width: height - iconName: Kube.Icons.save_inverted - onClicked: root.download() + onClicked: root.execute() padding: 0 } } diff --git a/framework/qml/Icons.qml b/framework/qml/Icons.qml index e3272eb8..9a3bcb77 100644 --- a/framework/qml/Icons.qml +++ b/framework/qml/Icons.qml @@ -54,6 +54,7 @@ Item { property string goUp: "go-down" property string addNew: "list-add" + property string remove: "list-remove" property string folder: "folder" property string save_inverted: "document-save-inverted" diff --git a/framework/qml/MailViewer.qml b/framework/qml/MailViewer.qml index 2fc304b2..67279d6b 100644 --- a/framework/qml/MailViewer.qml +++ b/framework/qml/MailViewer.qml @@ -281,12 +281,10 @@ Rectangle { icon: model.iconName clip: true - onDownload: { - messageParser.attachments.saveAttachmentToDisk(messageParser.attachments.index(index, 0)) - } - onOpen: { - messageParser.attachments.openAttachment(messageParser.attachments.index(index, 0)) - } + + actionIcon: Kube.Icons.save_inverted + onExecute: messageParser.attachments.saveAttachmentToDisk(messageParser.attachments.index(index, 0)) + onClicked: messageParser.attachments.openAttachment(messageParser.attachments.index(index, 0)) } } } -- cgit v1.2.3