feat(notifications): add right-click to dismiss popup (#6400)
Add right-click handling to the notification card MouseArea so users can manually dismiss notifications by right-clicking on them. Previously, only left-click was handled (which triggered the default action). Now right-click emits closeRequested() to dismiss the popup. Co-authored-by: taxin <unknownbrofrombd@duck.com>
This commit is contained in:
@@ -77,7 +77,14 @@ BorderSurface {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: root.cardClicked()
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onClicked: function(mouse) {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
root.closeRequested()
|
||||
} else {
|
||||
root.cardClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
Reference in New Issue
Block a user