mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
unbrick notification keyboard navi
This commit is contained in:
@@ -22,6 +22,10 @@ DankModal {
|
|||||||
modalKeyboardController.reset()
|
modalKeyboardController.reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
modalFocusScope.Keys.onPressed: function(event) {
|
||||||
|
modalKeyboardController.handleKey(event)
|
||||||
|
}
|
||||||
|
|
||||||
NotificationKeyboardController {
|
NotificationKeyboardController {
|
||||||
id: modalKeyboardController
|
id: modalKeyboardController
|
||||||
listView: null
|
listView: null
|
||||||
@@ -79,19 +83,10 @@ DankModal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property Component notificationContent: Component {
|
property Component notificationContent: Component {
|
||||||
FocusScope {
|
Item {
|
||||||
id: notificationKeyHandler
|
id: notificationKeyHandler
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
focus: true
|
|
||||||
|
|
||||||
Keys.onPressed: function(event) {
|
|
||||||
modalKeyboardController.handleKey(event)
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
forceActiveFocus()
|
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -135,27 +130,6 @@ DankModal {
|
|||||||
showHints: modalKeyboardController.showKeyboardHints
|
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