fix: disable panel dragging during text input and dialog interaction

NPanel: disable DragHandler when popups open, block drag over text inputs
BarWidgetSettingsDialog: notify panel of open/close state
BarSectionEditor: pass panel reference to dialog
This commit is contained in:
Ly-sec
2025-09-20 12:23:43 +02:00
parent 8d0ce8dc49
commit 56db321846
3 changed files with 150 additions and 3 deletions
+13 -1
View File
@@ -23,6 +23,9 @@ NBox {
signal dragPotentialStarted
signal dragPotentialEnded
property bool hasOpenDialog: false
property bool hasOpenPopup: false
color: Color.mSurface
Layout.fillWidth: true
Layout.minimumHeight: {
@@ -189,11 +192,15 @@ NBox {
onClicked: {
var component = Qt.createComponent(Qt.resolvedUrl("BarWidgetSettingsDialog.qml"))
function instantiateAndOpen() {
// Find the settings panel
var settingsPanel = findSettingsPanel()
var dialog = component.createObject(root, {
"widgetIndex": index,
"widgetData": modelData,
"widgetId": modelData.id,
"parent": Overlay.overlay
"parent": Overlay.overlay,
"settingsPanel": settingsPanel
})
if (dialog) {
dialog.open()
@@ -201,6 +208,11 @@ NBox {
Logger.error("BarSectionEditor", "Failed to create settings dialog instance")
}
}
function findSettingsPanel() {
var panel = PanelService.getPanel("settingsPanel")
return panel
}
if (component.status === Component.Ready) {
instantiateAndOpen()
} else if (component.status === Component.Error) {