Commit 1119f6fb authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Notifications: Close notification popup with middle click

BUG: 456243
parent 66e226ac
Pipeline #230211 passed with stage
in 6 minutes and 21 seconds
......@@ -161,10 +161,20 @@ PlasmaCore.Dialog {
onDismissRequested: popupNotificationsModel.close(popupNotificationsModel.index(index, 0))
cursorShape: hasDefaultAction ? Qt.PointingHandCursor : Qt.ArrowCursor
acceptedButtons: hasDefaultAction || draggable ? Qt.LeftButton : Qt.NoButton
acceptedButtons: {
let buttons = Qt.MiddleButton;
if (hasDefaultAction || draggable) {
buttons |= Qt.LeftButton;
}
return buttons;
}
onClicked: {
if (hasDefaultAction) {
if (mouse.button === Qt.MiddleButton) {
if (notificationItem.closable) {
notificationItem.closeClicked();
}
} else if (hasDefaultAction) {
notificationPopup.defaultActionInvoked();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment