mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
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:
@@ -14,6 +14,7 @@ Popup {
|
||||
property int widgetIndex: -1
|
||||
property var widgetData: null
|
||||
property string widgetId: ""
|
||||
property var settingsPanel: null
|
||||
|
||||
// Center popup in parent
|
||||
x: (parent.width - width) * 0.5
|
||||
@@ -23,6 +24,7 @@ Popup {
|
||||
height: content.implicitHeight + padding * 2
|
||||
padding: Style.marginXL * scaling
|
||||
modal: true
|
||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||
|
||||
background: Rectangle {
|
||||
id: bgRect
|
||||
@@ -37,6 +39,20 @@ Popup {
|
||||
if (widgetData && widgetId) {
|
||||
loadWidgetSettings()
|
||||
}
|
||||
notifySettingsPanel(true)
|
||||
}
|
||||
|
||||
onClosed: {
|
||||
notifySettingsPanel(false)
|
||||
}
|
||||
|
||||
function notifySettingsPanel(isOpen) {
|
||||
if (settingsPanel && settingsPanel.hasOwnProperty('hasOpenPopup')) {
|
||||
settingsPanel.hasOpenPopup = isOpen
|
||||
Logger.log("BarWidgetSettingsDialog", "Notified settings panel popup state:", isOpen, "Panel:", settingsPanel.objectName || "unnamed")
|
||||
} else {
|
||||
Logger.warn("BarWidgetSettingsDialog", "No settings panel reference available to notify popup state:", isOpen)
|
||||
}
|
||||
}
|
||||
|
||||
function loadWidgetSettings() {
|
||||
|
||||
Reference in New Issue
Block a user