mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 07:22:50 -05:00
Add middle-click close and collapse popout (#813)
* Add middle-click close and collapse popout * Revert ControlCenterPopout
This commit is contained in:
@@ -458,7 +458,7 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||||
onClicked: mouse => {
|
onClicked: mouse => {
|
||||||
if (mouse.button === Qt.LeftButton) {
|
if (mouse.button === Qt.LeftButton) {
|
||||||
if (isGrouped && windowCount > 1) {
|
if (isGrouped && windowCount > 1) {
|
||||||
@@ -505,6 +505,12 @@ Item {
|
|||||||
windowContextMenuLoader.item.showAt(relativeX, yPos, false, "top");
|
windowContextMenuLoader.item.showAt(relativeX, yPos, false, "top");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (mouse.button === Qt.MiddleButton) {
|
||||||
|
if (toplevelObject) {
|
||||||
|
if (typeof toplevelObject.close === "function") {
|
||||||
|
toplevelObject.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onEntered: {
|
onEntered: {
|
||||||
|
|||||||
Reference in New Issue
Block a user