mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Add middle-click to close running dock tasks
Middle-click on a running task in the dock now closes it, matching standard desktop taskbar behavior.
This commit is contained in:
parent
4efc6e29c7
commit
0cbd933e71
1 changed files with 7 additions and 2 deletions
|
|
@ -812,13 +812,18 @@ MouseArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Click to activate, hover for thumbnail preview
|
// Click to activate, middle-click to close, hover for thumbnail preview
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: taskMouseArea
|
id: taskMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
|
||||||
onClicked: (mouse) => {
|
onClicked: (mouse) => {
|
||||||
|
if (mouse.button === Qt.MiddleButton) {
|
||||||
|
thumbnailPopup.close()
|
||||||
|
tasksModel.requestClose(tasksModel.makeModelIndex(taskDelegate.index));
|
||||||
|
return
|
||||||
|
}
|
||||||
if (mouse.button === Qt.RightButton) {
|
if (mouse.button === Qt.RightButton) {
|
||||||
thumbnailPopup.close()
|
thumbnailPopup.close()
|
||||||
thumbnailShowTimer.stop()
|
thumbnailShowTimer.stop()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue