Files
z-bar-qt/Drawers/Panels.qml
T
2026-02-04 14:11:30 +01:00

74 lines
1.5 KiB
QML

import Quickshell
import QtQuick
import QtQuick.Shapes
import qs.Modules as Modules
import qs.Modules.Notifications as Notifications
import qs.Modules.Notifications.Sidebar as Sidebar
import qs.Modules.Notifications.Sidebar.Utils as Utils
import qs.Config
Item {
id: root
required property ShellScreen screen
required property Item bar
required property PersistentProperties visibilities
readonly property alias popouts: popouts
readonly property alias sidebar: sidebar
readonly property alias notifications: notifications
readonly property alias utilities: utilities
anchors.fill: parent
// anchors.margins: 8
anchors.topMargin: bar.implicitHeight
Modules.Wrapper {
id: popouts
screen: root.screen
anchors.top: parent.top
x: {
const off = currentCenter - nonAnimWidth / 2;
const diff = root.width - Math.floor(off + nonAnimWidth);
if ( diff < 0 )
return off + diff;
return Math.floor( Math.max( off, 0 ));
}
}
Notifications.Wrapper {
id: notifications
visibilities: root.visibilities
panels: root
anchors.top: parent.top
anchors.right: parent.right
}
Utils.Wrapper {
id: utilities
visibilities: root.visibilities
sidebar: sidebar
popouts: popouts
anchors.bottom: parent.bottom
anchors.right: parent.right
}
Sidebar.Wrapper {
id: sidebar
visibilities: root.visibilities
panels: root
anchors.top: notifications.bottom
anchors.bottom: utilities.top
anchors.right: parent.right
}
}