From 76c761db28650f31ce9a4a3154616b7d1dc52038 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Wed, 11 Jan 2017 19:14:38 +0100 Subject: add hover actions --- components/package/contents/ui/MailListView.qml | 57 +++++++++++++++++++++---- 1 file changed, 48 insertions(+), 9 deletions(-) (limited to 'components/package') diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml index 13e697ae..398de649 100644 --- a/components/package/contents/ui/MailListView.qml +++ b/components/package/contents/ui/MailListView.qml @@ -169,15 +169,15 @@ Item { leftMargin: Kirigami.Units.largeSpacing } - Text{ - text: model.subject - color: mailListDelegate.checked ? Kirigami.Theme.highlightedTextColor : model.unread ? "#1d99f3" : Kirigami.Theme.textColor - - maximumLineCount: 2 - width: mailListDelegate.width - Kirigami.Units.largeSpacing * 2 - unreadCounter.width - wrapMode: Text.Wrap - elide: Text.ElideRight - } + Text{ + text: model.subject + color: mailListDelegate.checked ? Kirigami.Theme.highlightedTextColor : model.unread ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor + + maximumLineCount: 2 + width: mailListDelegate.width - Kirigami.Units.largeSpacing * 2 - unreadCounter.width + wrapMode: Text.Wrap + elide: Text.ElideRight + } Text { text: model.senderName @@ -197,6 +197,9 @@ Item { font.italic: true color: mailListDelegate.checked ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.disabledTextColor font.pointSize: 9 + + visible: mailListDelegate.containsMouse == false + } Text { @@ -210,6 +213,42 @@ Item { text: model.threadSize color: mailListDelegate.checked ? Kirigami.Theme.highlightedTextColor : model.unread ? "#1d99f3" : Kirigami.Theme.disabledTextColor } + + Row { + id: actionButtons + + anchors { + right: parent.right + bottom: parent.bottom + } + + visible: mailListDelegate.containsMouse == true + spacing: Kirigami.Units.smallSpacing + + Controls.ToolButton { + iconName: "mail-mark-unread" + enabled: mailController.markAsReadAction.enabled + onClicked: { + //mailController.markAsReadAction.execute() + } + } + + Controls.ToolButton { + iconName: "mail-mark-important" + enabled: mailController.markAsImportantAction.enabled + onClicked: { + //mailController.markAsImportantAction.execute() + } + } + + Controls.ToolButton { + iconName: "edit-delete" + enabled: mailController.moveToTrashAction.enabled + onClicked: { + //mailController.moveToTrashAction.execute() + } + } + } } } } -- cgit v1.2.3