mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
PanelManager autoclose working!
This commit is contained in:
@@ -6,5 +6,6 @@ import qs.Modules.Settings
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property var openedPanel: null
|
||||
property SettingsWindow settingsWindow: null
|
||||
}
|
||||
|
||||
@@ -26,8 +26,6 @@ Singleton {
|
||||
// Used to access via Settings.data.xxx.yyy
|
||||
property var data: adapter
|
||||
|
||||
// Needed to only have one NPanel loaded at a time. <--- VERY BROKEN
|
||||
//property var openPanel: null
|
||||
Item {
|
||||
Component.onCompleted: {
|
||||
|
||||
|
||||
+3
-3
@@ -21,10 +21,10 @@ PanelWindow {
|
||||
function show() {
|
||||
// Ensure only one panel is visible at a time using Settings as ephemeral store
|
||||
try {
|
||||
if (Settings.openPanel && Settings.openPanel !== root && Settings.openPanel.hide) {
|
||||
Settings.openPanel.hide()
|
||||
if (PanelManager.openedPanel && PanelManager.openedPanel !== root && PanelManager.openedPanel.hide) {
|
||||
PanelManager.openedPanel.hide()
|
||||
}
|
||||
Settings.openPanel = root
|
||||
PanelManager.openedPanel = root
|
||||
} catch (e) {
|
||||
|
||||
// ignore
|
||||
|
||||
Reference in New Issue
Block a user