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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user