107 lines
2.7 KiB
QML
107 lines
2.7 KiB
QML
import qs.services
|
|
import qs.config
|
|
import qs.modules.osd as Osd
|
|
import qs.modules.notifications as Notifications
|
|
import qs.modules.session as Session
|
|
import qs.modules.launcher as Launcher
|
|
import qs.modules.dashboard as Dashboard
|
|
import qs.modules.bar.popouts as BarPopouts
|
|
import qs.modules.utilities as Utilities
|
|
import Quickshell
|
|
import QtQuick
|
|
|
|
Item {
|
|
id: root
|
|
|
|
required property ShellScreen screen
|
|
required property PersistentProperties visibilities
|
|
required property Item bar
|
|
|
|
readonly property Osd.Wrapper osd: osd
|
|
readonly property Notifications.Wrapper notifications: notifications
|
|
readonly property Session.Wrapper session: session
|
|
readonly property Launcher.Wrapper launcher: launcher
|
|
readonly property Dashboard.Wrapper dashboard: dashboard
|
|
readonly property BarPopouts.Wrapper popouts: popouts
|
|
readonly property Utilities.Wrapper utilities: utilities
|
|
|
|
anchors.fill: parent
|
|
anchors.margins: Config.border.thickness
|
|
anchors.leftMargin: bar.implicitWidth
|
|
|
|
Osd.Wrapper {
|
|
id: osd
|
|
|
|
clip: root.visibilities.session
|
|
screen: root.screen
|
|
visibility: root.visibilities.osd
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: session.width
|
|
}
|
|
|
|
Notifications.Wrapper {
|
|
id: notifications
|
|
|
|
visibilities: root.visibilities
|
|
panel: root
|
|
|
|
anchors.top: parent.top
|
|
anchors.right: parent.right
|
|
}
|
|
|
|
Session.Wrapper {
|
|
id: session
|
|
|
|
visibilities: root.visibilities
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.right: parent.right
|
|
}
|
|
|
|
Launcher.Wrapper {
|
|
id: launcher
|
|
|
|
visibilities: root.visibilities
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.bottom: parent.bottom
|
|
}
|
|
|
|
Dashboard.Wrapper {
|
|
id: dashboard
|
|
|
|
visibilities: root.visibilities
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.top: parent.top
|
|
}
|
|
|
|
BarPopouts.Wrapper {
|
|
id: popouts
|
|
|
|
screen: root.screen
|
|
|
|
x: isDetached ? (root.width - nonAnimWidth) / 2 : 0
|
|
y: {
|
|
if (isDetached)
|
|
return (root.height - nonAnimHeight) / 2;
|
|
|
|
const off = currentCenter - Config.border.thickness - nonAnimHeight / 2;
|
|
const diff = root.height - Math.floor(off + nonAnimHeight);
|
|
if (diff < 0)
|
|
return off + diff;
|
|
return off;
|
|
}
|
|
}
|
|
|
|
Utilities.Wrapper {
|
|
id: utilities
|
|
|
|
visibility: root.visibilities.utilities
|
|
|
|
anchors.bottom: parent.bottom
|
|
anchors.right: parent.right
|
|
}
|
|
}
|