toggleable sidebar

This commit is contained in:
end-4
2025-04-13 17:07:32 +02:00
parent 248ff831ab
commit a139c29a2b
3 changed files with 32 additions and 6 deletions
@@ -3,7 +3,9 @@ import "../common/widgets"
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell.Io
import Quickshell
import Quickshell.Wayland
Scope {
id: bar
@@ -14,13 +16,15 @@ Scope {
model: Quickshell.screens
PanelWindow {
id: barRoot
id: sidebarRoot
visible: false
property var modelData
screen: modelData
exclusiveZone: 0
width: sidebarWidth
WlrLayershell.namespace: "quickshell:sidebarRight"
color: "transparent"
anchors {
@@ -32,6 +36,7 @@ Scope {
// Background
Rectangle {
id: sidebarRightBackground
anchors.centerIn: parent
width: parent.width - Appearance.sizes.hyprlandGapsOut * 2
height: parent.height - Appearance.sizes.hyprlandGapsOut * 2
@@ -39,6 +44,25 @@ Scope {
radius: Appearance.rounding.screenRounding - Appearance.sizes.elevationMargin + 1
}
// Shadow
// DropShadow {
// anchors.fill: sideRightBackground
// horizontalOffset: 0
// verticalOffset: 2
// radius: 3
// samples: 17
// color: Appearance.m3colors.m3shadow
// source: sideRightBackground
// }
IpcHandler {
target: "sidebarRight"
function toggle(): void {
sidebarRoot.visible = !sidebarRoot.visible
}
}
}
}