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 {
|
||||
isLoaded: Settings.data.general.showScreenCorners
|
||||
|
||||
panel: Variants {
|
||||
content: Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
PanelWindow {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import qs.Widgets
|
|||
NLoader {
|
||||
id: root
|
||||
|
||||
panel: Component {
|
||||
content: Component {
|
||||
NPanel {
|
||||
id: demoPanel
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ NLoader {
|
|||
}
|
||||
}
|
||||
|
||||
panel: Component {
|
||||
content: Component {
|
||||
NPanel {
|
||||
id: sidePanel
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,22 @@
|
|||
import QtQuick
|
||||
|
||||
// Example usage:
|
||||
// NLoader {
|
||||
// content: Component {
|
||||
// NPanel {
|
||||
|
||||
Loader {
|
||||
id: loader
|
||||
|
||||
// Boolean control to load/unload the item
|
||||
property bool isLoaded: false
|
||||
|
||||
// Provide the component to load.
|
||||
// Example usage:
|
||||
// content: Component { NPanel { /* ... */ } }
|
||||
property Component panel
|
||||
// Provide the component to be loaded.
|
||||
property Component content
|
||||
|
||||
active: isLoaded
|
||||
asynchronous: true
|
||||
sourceComponent: panel
|
||||
sourceComponent: content
|
||||
|
||||
onActiveChanged: {
|
||||
if (active && item && item.show)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue