mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
unbrick notification keyboard navi
This commit is contained in:
@@ -22,6 +22,10 @@ DankModal {
|
||||
modalKeyboardController.reset()
|
||||
}
|
||||
|
||||
modalFocusScope.Keys.onPressed: function(event) {
|
||||
modalKeyboardController.handleKey(event)
|
||||
}
|
||||
|
||||
NotificationKeyboardController {
|
||||
id: modalKeyboardController
|
||||
listView: null
|
||||
@@ -79,19 +83,10 @@ DankModal {
|
||||
}
|
||||
|
||||
property Component notificationContent: Component {
|
||||
FocusScope {
|
||||
Item {
|
||||
id: notificationKeyHandler
|
||||
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
|
||||
Keys.onPressed: function(event) {
|
||||
modalKeyboardController.handleKey(event)
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
forceActiveFocus()
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors.fill: parent
|
||||
@@ -135,27 +130,6 @@ DankModal {
|
||||
showHints: modalKeyboardController.showKeyboardHints
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onNotificationModalOpenChanged() {
|
||||
if (notificationModal.notificationModalOpen) {
|
||||
Qt.callLater(function () {
|
||||
notificationKeyHandler.forceActiveFocus()
|
||||
})
|
||||
}
|
||||
}
|
||||
target: notificationModal
|
||||
}
|
||||
|
||||
|
||||
Connections {
|
||||
function onOpened() {
|
||||
Qt.callLater(function () {
|
||||
notificationKeyHandler.forceActiveFocus()
|
||||
})
|
||||
}
|
||||
target: notificationModal
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user