56 lines
1.2 KiB
QML
56 lines
1.2 KiB
QML
pragma Singleton
|
|
|
|
import QtQuick
|
|
import Quickshell
|
|
import qs.components
|
|
import qs.services
|
|
|
|
Singleton {
|
|
id: root
|
|
|
|
function create(parent: Item, props: var): void {
|
|
nexusComp.createObject(parent ?? dummy, props);
|
|
}
|
|
|
|
QtObject {
|
|
id: dummy
|
|
}
|
|
|
|
Component {
|
|
id: nexusComp
|
|
|
|
FloatingWindow {
|
|
id: win
|
|
|
|
color: Colours.tPalette.m3surface
|
|
|
|
onVisibleChanged: {
|
|
if (!visible)
|
|
destroy();
|
|
}
|
|
|
|
implicitWidth: nexus.implicitWidth
|
|
implicitHeight: nexus.implicitHeight
|
|
|
|
minimumSize.width: implicitWidth
|
|
minimumSize.height: implicitHeight
|
|
maximumSize.width: implicitWidth
|
|
maximumSize.height: implicitHeight
|
|
|
|
title: qsTr("Nexus — %1").arg(nexus.nState.currentPageName)
|
|
|
|
Nexus {
|
|
id: nexus
|
|
|
|
anchors.fill: parent
|
|
nState.screen: win.screen
|
|
nState.isWindow: true
|
|
onClose: win.destroy()
|
|
}
|
|
|
|
Behavior on color {
|
|
CAnim {}
|
|
}
|
|
}
|
|
}
|
|
}
|