made panelwindow apply to the whole bar instead of individual containers
This commit is contained in:
152
Bar.qml
152
Bar.qml
@@ -8,96 +8,122 @@ import "Color.js" as Colors
|
|||||||
|
|
||||||
Scope {
|
Scope {
|
||||||
Variants {
|
Variants {
|
||||||
|
id: panelDelegate
|
||||||
|
|
||||||
|
delegate: panelWindow
|
||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
|
}
|
||||||
|
|
||||||
delegate: Component {
|
Component {
|
||||||
PanelWindow {
|
id: panelWindow
|
||||||
id: win
|
|
||||||
|
|
||||||
property double barExclusionZone: 15
|
PanelWindow {
|
||||||
property double barMaxHeight: 1000
|
id: win
|
||||||
required property var modelData
|
|
||||||
property HyprlandMonitor monitor: Hyprland.monitorFor(modelData)
|
|
||||||
|
|
||||||
color: "transparent"
|
property double barExclusionZone: 15
|
||||||
exclusionMode: ExclusionMode.Normal
|
property double barMaxHeight: 1000
|
||||||
exclusiveZone: barExclusionZone
|
required property var modelData
|
||||||
implicitHeight: barMaxHeight
|
property HyprlandMonitor monitor: Hyprland.monitorFor(modelData)
|
||||||
screen: modelData
|
|
||||||
|
|
||||||
mask: Region {
|
color: "transparent"
|
||||||
Region {
|
exclusionMode: ExclusionMode.Normal
|
||||||
item: left
|
exclusiveZone: barExclusionZone
|
||||||
}
|
implicitHeight: barMaxHeight
|
||||||
|
mask: maskRegion
|
||||||
|
screen: modelData
|
||||||
|
|
||||||
Region {
|
Region {
|
||||||
item: center
|
id: maskRegion
|
||||||
}
|
|
||||||
|
|
||||||
Region {
|
Region {
|
||||||
item: right
|
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 {
|
anchors {
|
||||||
left: true
|
left: parent.left
|
||||||
right: true
|
leftMargin: 3
|
||||||
top: true
|
right: parent.right
|
||||||
|
rightMargin: 3
|
||||||
|
top: parent.top
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Row {
|
||||||
anchors {
|
id: left
|
||||||
fill: parent
|
|
||||||
topMargin: 3
|
|
||||||
}
|
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: 3
|
|
||||||
right: parent.right
|
|
||||||
rightMargin: 3
|
|
||||||
top: parent.top
|
top: parent.top
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
WorkspaceSelector {
|
||||||
id: left
|
monitor: win.monitor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
anchors {
|
Row {
|
||||||
left: parent.left
|
id: center
|
||||||
top: parent.top
|
|
||||||
}
|
|
||||||
|
|
||||||
WorkspaceSelector {
|
anchors {
|
||||||
monitor: win.monitor
|
horizontalCenter: parent.horizontalCenter
|
||||||
}
|
top: parent.top
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Time {
|
||||||
id: center
|
monitor: win.monitor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
anchors {
|
Row {
|
||||||
horizontalCenter: parent.horizontalCenter
|
id: right
|
||||||
top: parent.top
|
|
||||||
}
|
|
||||||
|
|
||||||
Time {
|
Layout.alignment: Qt.AlignTop
|
||||||
monitor: win.monitor
|
spacing: 5
|
||||||
}
|
|
||||||
|
anchors {
|
||||||
|
right: parent.right
|
||||||
|
top: parent.top
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Network {
|
||||||
id: right
|
monitor: win.monitor
|
||||||
|
}
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignTop
|
Bluetooth {
|
||||||
|
monitor: win.monitor
|
||||||
anchors {
|
|
||||||
right: parent.right
|
|
||||||
top: parent.top
|
|
||||||
}
|
|
||||||
|
|
||||||
Bluetooth {
|
|
||||||
monitor: win.monitor
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,16 +94,6 @@ Item {
|
|||||||
id: tapHandler
|
id: tapHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
RectangularShadow {
|
|
||||||
anchors.fill: container
|
|
||||||
blur: 30
|
|
||||||
color: Colors.mantle
|
|
||||||
offset.x: 5
|
|
||||||
offset.y: 2
|
|
||||||
radius: container.radius
|
|
||||||
spread: 5
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: container
|
id: container
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user