mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-08 06:25:37 -05:00
add clear all keybinding to notifs
This commit is contained in:
@@ -390,6 +390,23 @@ QtObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleKey(event) {
|
function handleKey(event) {
|
||||||
|
if ((event.key === Qt.Key_Delete || event.key === Qt.Key_Backspace) && (event.modifiers & Qt.ShiftModifier)) {
|
||||||
|
NotificationService.clearAllNotifications()
|
||||||
|
rebuildFlatNavigation()
|
||||||
|
if (flatNavigation.length === 0) {
|
||||||
|
keyboardNavigationActive = false
|
||||||
|
if (listView) {
|
||||||
|
listView.keyboardActive = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
selectedFlatIndex = 0
|
||||||
|
updateSelectedIdFromIndex()
|
||||||
|
}
|
||||||
|
selectionVersion++
|
||||||
|
event.accepted = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (event.key === Qt.Key_Escape) {
|
if (event.key === Qt.Key_Escape) {
|
||||||
if (keyboardNavigationActive) {
|
if (keyboardNavigationActive) {
|
||||||
keyboardNavigationActive = false
|
keyboardNavigationActive = false
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "Del: Clear • 1-9: Actions • ?: Help • Esc: Close"
|
text: "Del: Clear • Shift+Del: Clear All • 1-9: Actions • ?: Help • Esc: Close"
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|||||||
Reference in New Issue
Block a user