From 4106162feb2c7af0c0fec6477c5068a1fcb10fae Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 14 Jun 2017 15:38:25 +0200 Subject: Remove button --- components/kube/contents/ui/ComposerView.qml | 1 + framework/qml/AttachmentDelegate.qml | 11 ++++++----- framework/qml/Icons.qml | 1 + framework/qml/MailViewer.qml | 10 ++++------ icons/breeze/icons/actions/16/list-remove-inverted.svg | 16 ++++++++++++++++ icons/breeze/icons/actions/16/list-remove.svg | 16 ++++++++++++++++ icons/breeze/icons/actions/22/list-remove-inverted.svg | 3 +++ icons/breeze/icons/actions/22/list-remove.svg | 3 +++ icons/breeze/icons/actions/24/list-remove-inverted.svg | 14 ++++++++++++++ icons/breeze/icons/actions/24/list-remove.svg | 14 ++++++++++++++ icons/copybreeze.sh | 3 ++- 11 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 icons/breeze/icons/actions/16/list-remove-inverted.svg create mode 100644 icons/breeze/icons/actions/16/list-remove.svg create mode 100644 icons/breeze/icons/actions/22/list-remove-inverted.svg create mode 100644 icons/breeze/icons/actions/22/list-remove.svg create mode 100644 icons/breeze/icons/actions/24/list-remove-inverted.svg create mode 100644 icons/breeze/icons/actions/24/list-remove.svg diff --git a/components/kube/contents/ui/ComposerView.qml b/components/kube/contents/ui/ComposerView.qml index 84c55ec5..b92b0f2a 100644 --- a/components/kube/contents/ui/ComposerView.qml +++ b/components/kube/contents/ui/ComposerView.qml @@ -270,6 +270,7 @@ Kube.View { name: model.filename icon: model.iconName clip: true + actionIcon: Kube.Icons.remove } } } 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)) } } } diff --git a/icons/breeze/icons/actions/16/list-remove-inverted.svg b/icons/breeze/icons/actions/16/list-remove-inverted.svg new file mode 100644 index 00000000..dc56f8c2 --- /dev/null +++ b/icons/breeze/icons/actions/16/list-remove-inverted.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/breeze/icons/actions/16/list-remove.svg b/icons/breeze/icons/actions/16/list-remove.svg new file mode 100644 index 00000000..405bd4ab --- /dev/null +++ b/icons/breeze/icons/actions/16/list-remove.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/breeze/icons/actions/22/list-remove-inverted.svg b/icons/breeze/icons/actions/22/list-remove-inverted.svg new file mode 100644 index 00000000..937ea04a --- /dev/null +++ b/icons/breeze/icons/actions/22/list-remove-inverted.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/breeze/icons/actions/22/list-remove.svg b/icons/breeze/icons/actions/22/list-remove.svg new file mode 100644 index 00000000..937ea04a --- /dev/null +++ b/icons/breeze/icons/actions/22/list-remove.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/breeze/icons/actions/24/list-remove-inverted.svg b/icons/breeze/icons/actions/24/list-remove-inverted.svg new file mode 100644 index 00000000..1b77328c --- /dev/null +++ b/icons/breeze/icons/actions/24/list-remove-inverted.svg @@ -0,0 +1,14 @@ + + + + + + diff --git a/icons/breeze/icons/actions/24/list-remove.svg b/icons/breeze/icons/actions/24/list-remove.svg new file mode 100644 index 00000000..1b77328c --- /dev/null +++ b/icons/breeze/icons/actions/24/list-remove.svg @@ -0,0 +1,14 @@ + + + + + + diff --git a/icons/copybreeze.sh b/icons/copybreeze.sh index 30a9da59..43bbcf4a 100755 --- a/icons/copybreeze.sh +++ b/icons/copybreeze.sh @@ -29,7 +29,8 @@ wantedIcons = [ "go-down.svg", "go-previous.svg", "mail-message.svg", - "list-add.svg" + "list-add.svg", + "list-remove.svg" ] def ensure_dir(file_path): -- cgit v1.2.3