screen corners: mask layer visibility to the corners only

This commit is contained in:
end-4
2025-06-07 11:29:32 +02:00
parent 810ea2ce3b
commit e03800cf64
@@ -5,6 +5,7 @@ import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
import Quickshell.Wayland
import Quickshell.Hyprland
Scope {
id: screenCorners
@@ -23,6 +24,20 @@ Scope {
mask: Region {
item: null
}
HyprlandWindow.visibleMask: Region {
Region {
item: topLeftCorner
}
Region {
item: topRightCorner
}
Region {
item: bottomLeftCorner
}
Region {
item: bottomRightCorner
}
}
WlrLayershell.namespace: "quickshell:screenCorners"
WlrLayershell.layer: WlrLayer.Overlay
color: "transparent"
@@ -35,24 +50,28 @@ Scope {
}
RoundCorner {
id: topLeftCorner
anchors.top: parent.top
anchors.left: parent.left
size: Appearance.rounding.screenRounding
corner: cornerEnum.topLeft
}
RoundCorner {
id: topRightCorner
anchors.top: parent.top
anchors.right: parent.right
size: Appearance.rounding.screenRounding
corner: cornerEnum.topRight
}
RoundCorner {
id: bottomLeftCorner
anchors.bottom: parent.bottom
anchors.left: parent.left
size: Appearance.rounding.screenRounding
corner: cornerEnum.bottomLeft
}
RoundCorner {
id: bottomRightCorner
anchors.bottom: parent.bottom
anchors.right: parent.right
size: Appearance.rounding.screenRounding