diff options
Diffstat (limited to 'modules/drawers')
| -rw-r--r-- | modules/drawers/Backgrounds.qml | 24 | ||||
| -rw-r--r-- | modules/drawers/Drawers.qml | 38 | ||||
| -rw-r--r-- | modules/drawers/Panels.qml | 25 |
3 files changed, 84 insertions, 3 deletions
diff --git a/modules/drawers/Backgrounds.qml b/modules/drawers/Backgrounds.qml new file mode 100644 index 0000000..70fd48f --- /dev/null +++ b/modules/drawers/Backgrounds.qml @@ -0,0 +1,24 @@ +import "root:/services" +import "root:/config" +import "root:/modules/osd" as Osd +import Quickshell +import QtQuick +import QtQuick.Shapes + +Shape { + id: root + + required property Panels panels + + anchors.fill: parent + anchors.margins: BorderConfig.thickness + preferredRendererType: Shape.CurveRenderer + opacity: Colours.transparency.enabled ? Colours.transparency.base : 1 + + Osd.Background { + wrapper: panels.osd + + startX: root.width + startY: (root.height - panels.osd.height) / 2 + } +} diff --git a/modules/drawers/Drawers.qml b/modules/drawers/Drawers.qml index 7d1d3e3..d8f242b 100644 --- a/modules/drawers/Drawers.qml +++ b/modules/drawers/Drawers.qml @@ -1,6 +1,10 @@ +pragma ComponentBehavior: Bound + import "root:/widgets" +import "root:/services" import "root:/config" import Quickshell +import QtQuick Variants { model: Quickshell.screens @@ -27,6 +31,13 @@ Variants { width: scope.modelData.width - BorderConfig.thickness * 2 height: scope.modelData.height - BorderConfig.thickness * 2 intersection: Intersection.Xor + + regions: panels.children.map(c => regionComp.createObject(this, { + x: c.x, + y: c.y, + width: c.width, + height: c.height + })) } anchors.top: true @@ -34,14 +45,35 @@ Variants { anchors.left: true anchors.right: true - Border { - id: border + Component { + id: regionComp + + Region { + intersection: Intersection.Subtract + } + } + + Item { + id: background + anchors.fill: parent visible: false + + Border {} + + Backgrounds { + panels: panels + } } LayerShadow { - source: border + source: background + } + + Panels { + id: panels + + screen: scope.modelData } Interactions { diff --git a/modules/drawers/Panels.qml b/modules/drawers/Panels.qml new file mode 100644 index 0000000..fd56f1b --- /dev/null +++ b/modules/drawers/Panels.qml @@ -0,0 +1,25 @@ +import "root:/widgets" +import "root:/services" +import "root:/config" +import "root:/modules/osd" as Osd +import Quickshell +import QtQuick + +Item { + id: root + + required property ShellScreen screen + readonly property Osd.Wrapper osd: osd + + anchors.fill: parent + anchors.margins: BorderConfig.thickness + + Osd.Wrapper { + id: osd + + screen: root.screen + + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + } +} |