NLoader: renamed property panel => content so it looks more versatile
This commit is contained in:
parent
42073b289e
commit
620afc7d03
4 changed files with 11 additions and 8 deletions
|
|
@ -8,7 +8,7 @@ import qs.Widgets
|
||||||
NLoader {
|
NLoader {
|
||||||
isLoaded: Settings.data.general.showScreenCorners
|
isLoaded: Settings.data.general.showScreenCorners
|
||||||
|
|
||||||
panel: Variants {
|
content: Variants {
|
||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import qs.Widgets
|
||||||
NLoader {
|
NLoader {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
panel: Component {
|
content: Component {
|
||||||
NPanel {
|
NPanel {
|
||||||
id: demoPanel
|
id: demoPanel
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ NLoader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
panel: Component {
|
content: Component {
|
||||||
NPanel {
|
NPanel {
|
||||||
id: sidePanel
|
id: sidePanel
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,22 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
|
// Example usage:
|
||||||
|
// NLoader {
|
||||||
|
// content: Component {
|
||||||
|
// NPanel {
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: loader
|
id: loader
|
||||||
|
|
||||||
// Boolean control to load/unload the item
|
// Boolean control to load/unload the item
|
||||||
property bool isLoaded: false
|
property bool isLoaded: false
|
||||||
|
|
||||||
// Provide the component to load.
|
// Provide the component to be loaded.
|
||||||
// Example usage:
|
property Component content
|
||||||
// content: Component { NPanel { /* ... */ } }
|
|
||||||
property Component panel
|
|
||||||
|
|
||||||
active: isLoaded
|
active: isLoaded
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
sourceComponent: panel
|
sourceComponent: content
|
||||||
|
|
||||||
onActiveChanged: {
|
onActiveChanged: {
|
||||||
if (active && item && item.show)
|
if (active && item && item.show)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue