summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2017-03-31 09:14:02 (GMT)
committerKai Uwe Broulik <kde@privat.broulik.de>2017-03-31 09:14:02 (GMT)
commit72f5d68657af460cf7e50c7c9ba231c1bbd3d694 (patch)
tree3eeb465acb24de424f47b77b6e2f09eaaa04413b
parent1f8050e174f7161f303d3d7839fafaf9a87f104e (diff)
[Task Manager] Keep entry highlighted when context menu or group dialog is open
This makes it easier to see what item the menu or popup is for. In fact, the item should have stayed highlighted when the context menu is open but this was broken. Also, for consistency, use the hover effect also for the group dialog (it used to be the "active" task). Differential Revision: https://phabricator.kde.org/D5260
-rw-r--r--applets/taskmanager/package/contents/ui/Task.qml13
1 files changed, 8 insertions, 5 deletions
diff --git a/applets/taskmanager/package/contents/ui/Task.qml b/applets/taskmanager/package/contents/ui/Task.qml
index bf4e857..e17319d 100644
--- a/applets/taskmanager/package/contents/ui/Task.qml
+++ b/applets/taskmanager/package/contents/ui/Task.qml
@@ -56,6 +56,8 @@ MouseArea {
property QtObject smartLauncherItem: null
readonly property bool highlighted: (inPopup && activeFocus) || (!inPopup && containsMouse)
+ || (task.contextMenu && task.contextMenu.status === PlasmaComponents.DialogStatus.Open)
+ || (groupDialog.visible && groupDialog.visualParent === task)
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MidButton
@@ -104,7 +106,8 @@ MouseArea {
toolTip.hideToolTip();
}
- tasks.createContextMenu(task).show();
+ contextMenu = tasks.createContextMenu(task);
+ contextMenu.show();
}
}
@@ -344,7 +347,7 @@ MouseArea {
anchors.fill: parent
- active: task.highlighted || (task.contextMenu && task.contextMenu.status == PlasmaComponents.DialogStatus.Open)
+ active: task.highlighted
enabled: true
usesPlasmaTheme: false
@@ -430,7 +433,7 @@ MouseArea {
},
State {
name: "hovered"
- when: task.highlighted || (contextMenu.status == PlasmaComponents.DialogStatus.Open && contextMenu.visualParent == task)
+ when: task.highlighted
PropertyChanges {
target: frame
@@ -448,7 +451,7 @@ MouseArea {
},
State {
name: "minimized"
- when: model.IsMinimized === true && !(groupDialog.visible && groupDialog.visualParent == task)
+ when: model.IsMinimized === true
PropertyChanges {
target: frame
@@ -457,7 +460,7 @@ MouseArea {
},
State {
name: "active"
- when: model.IsActive === true || groupDialog.visible && groupDialog.visualParent == task
+ when: model.IsActive === true
PropertyChanges {
target: frame