Add loader to ScreenCorner, proper position for SidePanel, update Settings & NPanel to only display one NPanel at a time (latest one)
This commit is contained in:
parent
cdee8023de
commit
7b653ec5a3
8 changed files with 208 additions and 138 deletions
|
|
@ -27,6 +27,7 @@ Loader {
|
|||
|
||||
Connections {
|
||||
target: loader.item
|
||||
ignoreUnknownSignals: true
|
||||
function onDismissed() {
|
||||
loader.isLoaded = false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,11 +13,20 @@ PanelWindow {
|
|||
signal dismissed
|
||||
|
||||
function hide() {
|
||||
visible = false
|
||||
//visible = false
|
||||
dismissed()
|
||||
}
|
||||
|
||||
function show() {
|
||||
// Ensure only one panel is visible at a time using Settings as ephemeral store
|
||||
try {
|
||||
if (Settings.openPanel && Settings.openPanel !== outerPanel && Settings.openPanel.hide) {
|
||||
Settings.openPanel.hide()
|
||||
}
|
||||
Settings.openPanel = outerPanel
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
visible = true
|
||||
}
|
||||
|
||||
|
|
@ -44,4 +53,16 @@ PanelWindow {
|
|||
easing.type: Easing.InOutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
try {
|
||||
if (visible && Settings.openPanel === outerPanel) Settings.openPanel = null
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
onVisibleChanged: function() {
|
||||
try {
|
||||
if (!visible && Settings.openPanel === outerPanel) Settings.openPanel = null
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue