mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-23 19:54:02 -04:00
modal: forward unhandled content keys to the modal focus scopes
fixes #3735
This commit is contained in:
1 parent
4dd159c7b2
commit
c417cd10ea
4 files changed
+3
-4
No files matched your search
@@ -76,8 +76,6 @@ DModal {
|
||||
modalWidth: Math.min(ClipboardConstants.sizeWidth(SettingsData.clipboardSize), screenWidth - Theme.spacingXL * 2)
|
||||
modalHeight: Math.min(ClipboardConstants.sizeHeight(SettingsData.clipboardSize), screenHeight - Theme.spacingXL * 2)
|
||||
backgroundColor: Theme.floatingWindowSurface
|
||||
borderColor: Theme.outlineVariant
|
||||
borderWidth: Theme.outlineWidth
|
||||
enableShadow: true
|
||||
closeOnEscapeKey: (contentLoader.item?.mode ?? "history") === "history"
|
||||
onBackgroundClicked: hide()
|
||||
|
||||
@@ -135,6 +135,7 @@ Item {
|
||||
|
||||
modalHandle: root
|
||||
connected: root._resolvedConnected
|
||||
handleFocusScope: _modalFocusScope
|
||||
|
||||
onShouldBeVisibleChanged: {
|
||||
if (root.shouldBeVisible !== host.shouldBeVisible)
|
||||
|
||||
@@ -71,6 +71,7 @@ Item {
|
||||
readonly property bool effectiveBlurEnabled: Theme.connectedSurfaceBlurEnabled
|
||||
property bool enableShadow: modalHandle.enableShadow
|
||||
property alias modalFocusScope: focusScope
|
||||
property Item handleFocusScope: null
|
||||
property bool shouldBeVisible: false
|
||||
property bool isClosing: false
|
||||
property bool shouldHaveFocus: shouldBeVisible
|
||||
@@ -851,6 +852,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
focus: root.shouldBeVisible
|
||||
clip: false
|
||||
Keys.forwardTo: root.handleFocusScope ? [root.handleFocusScope, focusScope] : [focusScope]
|
||||
|
||||
Item {
|
||||
id: directContentWrapper
|
||||
|
||||
@@ -131,8 +131,6 @@ DModal {
|
||||
modalWidth: 600
|
||||
modalHeight: 600
|
||||
backgroundColor: Theme.floatingWindowSurface
|
||||
borderColor: Theme.outlineMedium
|
||||
borderWidth: 1
|
||||
enableShadow: true
|
||||
keepContentLoaded: true
|
||||
|
||||
|
||||
Reference in new issue
Block a user