From 40d51446dec55d72fd88537bab570fbcc6cb69f7 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Fri, 21 Apr 2017 16:52:09 +0200 Subject: add dummy button to maillist delegate --- framework/qml/MailListView.qml | 43 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) (limited to 'framework/qml') diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index da5e9056..a662f5c8 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml @@ -216,18 +216,20 @@ Item { PropertyChanges {target: background; color: Kube.Colors.highlightColor} PropertyChanges {target: subject; color: Kube.Colors.highlightedTextColor} PropertyChanges {target: sender; color: Kube.Colors.highlightedTextColor} - PropertyChanges {target: date; color: Kube.Colors.highlightedTextColor} PropertyChanges {target: threadCounter; color: Kube.Colors.highlightedTextColor} + PropertyChanges {target: date; visible: false} + PropertyChanges {target: buttons; visible: true} }, State { name: "hovered" - when: mouseArea.containsMouse && !mouseArea.drag.active + when: ( mouseArea.containsMouse || buttons.containsMouse ) && !mouseArea.drag.active - PropertyChanges {target: background; color: Kube.Colors.highlightColor; opacity: 0.7} + PropertyChanges {target: background; color: Kube.Colors.highlightColor; opacity: 0.6} PropertyChanges {target: subject; color: Kube.Colors.highlightedTextColor} PropertyChanges {target: sender; color: Kube.Colors.highlightedTextColor} - PropertyChanges {target: date; color: Kube.Colors.highlightedTextColor} + PropertyChanges {target: date; visible: false} PropertyChanges {target: threadCounter; color: Kube.Colors.highlightedTextColor} + PropertyChanges {target: buttons; visible: true} } ] @@ -325,6 +327,39 @@ Item { visible: model.threadSize > 1 } } + + Row { + id: buttons + + property bool containsMouse: importantButton.hovered || deleteButton.hovered || unreadButton.hovered + + anchors { + right: parent.right + bottom: parent.bottom + margins: Kube.Units.smallSpacing + } + + visible: false + spacing: Kube.Units.smallSpacing + opacity: 0.7 + + Kube.Button { + id: unreadButton + + text: "u" + } + + Kube.Button { + id: importantButton + + text: "i" + } + + Kube.Button { + id: deleteButton + text: "d" + } + } } } } -- cgit v1.2.3