From d54487022fcd2323f4a04c5ca55fc20508d87b6a Mon Sep 17 00:00:00 2001 From: voidarc Date: Fri, 7 Aug 2026 16:18:17 +0100 Subject: [PATCH] made panelwindow apply to the whole bar instead of individual containers --- Bar.qml | 152 +++++++++++++++++++++++---------------- Components/Container.qml | 10 --- 2 files changed, 89 insertions(+), 73 deletions(-) diff --git a/Bar.qml b/Bar.qml index 60a9880..73732a0 100644 --- a/Bar.qml +++ b/Bar.qml @@ -8,96 +8,122 @@ import "Color.js" as Colors Scope { Variants { + id: panelDelegate + + delegate: panelWindow model: Quickshell.screens + } - delegate: Component { - PanelWindow { - id: win + Component { + id: panelWindow - property double barExclusionZone: 15 - property double barMaxHeight: 1000 - required property var modelData - property HyprlandMonitor monitor: Hyprland.monitorFor(modelData) + PanelWindow { + id: win - color: "transparent" - exclusionMode: ExclusionMode.Normal - exclusiveZone: barExclusionZone - implicitHeight: barMaxHeight - screen: modelData + property double barExclusionZone: 15 + property double barMaxHeight: 1000 + required property var modelData + property HyprlandMonitor monitor: Hyprland.monitorFor(modelData) - mask: Region { - Region { - item: left - } + color: "transparent" + exclusionMode: ExclusionMode.Normal + exclusiveZone: barExclusionZone + implicitHeight: barMaxHeight + mask: maskRegion + screen: modelData - Region { - item: center - } + Region { + id: maskRegion - Region { - item: right - } + Region { + item: left + } + + Region { + item: center + } + + Region { + item: right + } + } + + anchors { + left: true + right: true + top: true + } + + MultiEffect { + anchors.fill: rowContainer + shadowBlur: 1.5 + shadowColor: Colors.mantle + shadowEnabled: true + shadowHorizontalOffset: 5 + shadowOpacity: 1 + shadowVerticalOffset: 3 + source: rowContainer + } + + Item { + id: rowContainer + + anchors { + fill: parent + topMargin: 3 } anchors { - left: true - right: true - top: true + left: parent.left + leftMargin: 3 + right: parent.right + rightMargin: 3 + top: parent.top } - Item { - anchors { - fill: parent - topMargin: 3 - } + Row { + id: left anchors { left: parent.left - leftMargin: 3 - right: parent.right - rightMargin: 3 top: parent.top } - Row { - id: left + WorkspaceSelector { + monitor: win.monitor + } + } - anchors { - left: parent.left - top: parent.top - } + Row { + id: center - WorkspaceSelector { - monitor: win.monitor - } + anchors { + horizontalCenter: parent.horizontalCenter + top: parent.top } - Row { - id: center + Time { + monitor: win.monitor + } + } - anchors { - horizontalCenter: parent.horizontalCenter - top: parent.top - } + Row { + id: right - Time { - monitor: win.monitor - } + Layout.alignment: Qt.AlignTop + spacing: 5 + + anchors { + right: parent.right + top: parent.top } - Row { - id: right + Network { + monitor: win.monitor + } - Layout.alignment: Qt.AlignTop - - anchors { - right: parent.right - top: parent.top - } - - Bluetooth { - monitor: win.monitor - } + Bluetooth { + monitor: win.monitor } } } diff --git a/Components/Container.qml b/Components/Container.qml index a178d59..988b76d 100644 --- a/Components/Container.qml +++ b/Components/Container.qml @@ -94,16 +94,6 @@ Item { id: tapHandler } - RectangularShadow { - anchors.fill: container - blur: 30 - color: Colors.mantle - offset.x: 5 - offset.y: 2 - radius: container.radius - spread: 5 - } - Rectangle { id: container