summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <[email protected]>2017-02-09 11:25:20 +0100
committerDavid Edmundson <[email protected]>2017-02-09 16:01:01 +0100
commit5fb9a2585d9fdb0b65954970815dd4edd83a1185 (patch)
treeeb81d76a345584d14a1cb023febac7c22af2ed3e
parent3df5b807041cbbf698fd9a2d008364ac62f2b0bd (diff)
Activate minimise all plasmoid on mouse enter if the user is dragging mimedata
Summary: This allows the user to easily drag a file from dolphin into a folderview on a desktop even if windows are in the way. BUG: 376212 Test Plan: Dragged an item, things minimised Normal mouse enter, nothing happened Click still works as normal Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D4521
-rw-r--r--applets/minimizeall/package/contents/ui/main.qml12
1 files changed, 11 insertions, 1 deletions
diff --git a/applets/minimizeall/package/contents/ui/main.qml b/applets/minimizeall/package/contents/ui/main.qml
index 2d4b14f..d21f672 100644
--- a/applets/minimizeall/package/contents/ui/main.qml
+++ b/applets/minimizeall/package/contents/ui/main.qml
@@ -97,8 +97,18 @@ Item {
MouseArea {
id: mouseArea
anchors.fill: parent
- hoverEnabled: true
onClicked: activate()
}
+ //also activate when dragging an item over the plasmoid so a user can easily drag data to the desktop
+ DropArea {
+ anchors.fill: parent
+ onEntered: activateTimer.start()
+ onExited: activateTimer.stop()
+ Timer {
+ id: activateTimer
+ interval: 250 //to match TaskManager
+ onTriggered: activate()
+ }
+ }
}
}