mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
SettingsWindow Loading
- reworked the way we load the settings to avoid using Qt.createComponent which breaks hot reload and more - introduced a new PanelManager singleton to hold some references to some panels and later will be used to force having a single panel opened at all time
This commit is contained in:
@@ -60,21 +60,7 @@ NBox {
|
||||
NIconButton {
|
||||
icon: "settings"
|
||||
onClicked: {
|
||||
if (!root.settingsWindow) {
|
||||
const comp = Qt.createComponent("../../Settings/SettingsWindow.qml")
|
||||
if (comp.status === Component.Ready) {
|
||||
root.settingsWindow = comp.createObject(root)
|
||||
} else {
|
||||
comp.statusChanged.connect(function () {
|
||||
if (comp.status === Component.Ready) {
|
||||
root.settingsWindow = comp.createObject(root)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
if (root.settingsWindow) {
|
||||
root.settingsWindow.isLoaded = !root.settingsWindow.isLoaded
|
||||
}
|
||||
PanelManager.settingsWindow.isLoaded = !PanelManager.settingsWindow.isLoaded
|
||||
}
|
||||
}
|
||||
NIconButton {
|
||||
|
||||
Reference in New Issue
Block a user