1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

fix: Widget popup warning

This commit is contained in:
purian23
2025-09-17 16:43:16 -04:00
parent cc7363eee1
commit ae6fd42163

View File

@@ -85,9 +85,32 @@ Popup {
onOpened: { onOpened: {
isOpening = false isOpening = false
Qt.callLater(() => { Qt.callLater(() => {
contentItem.forceActiveFocus()
searchField.forceActiveFocus() searchField.forceActiveFocus()
}) })
} }
onClosed: {
isOpening = false
allWidgets = []
targetSection = ""
searchQuery = ""
filteredWidgets = []
selectedIndex = -1
keyboardNavigationActive = false
}
background: Rectangle {
color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g,
Theme.surfaceContainer.b, 1)
border.color: Theme.primarySelected
border.width: 1
radius: Theme.cornerRadius
}
contentItem: Item {
anchors.fill: parent
focus: true
Keys.onPressed: event => { Keys.onPressed: event => {
if (event.key === Qt.Key_Escape) { if (event.key === Qt.Key_Escape) {
root.close() root.close()
@@ -115,26 +138,6 @@ Popup {
event.accepted = true event.accepted = true
} }
} }
onClosed: {
isOpening = false
allWidgets = []
targetSection = ""
searchQuery = ""
filteredWidgets = []
selectedIndex = -1
keyboardNavigationActive = false
}
background: Rectangle {
color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g,
Theme.surfaceContainer.b, 1)
border.color: Theme.primarySelected
border.width: 1
radius: Theme.cornerRadius
}
contentItem: Item {
anchors.fill: parent
DankActionButton { DankActionButton {
iconName: "close" iconName: "close"