diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-08 13:32:27 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-08 13:32:27 +1000 |
| commit | ac2ef10d3f049c96086ef8c337b7820a8fac970a (patch) | |
| tree | 1ad83b8b96ad59423a7f2694298c77e516d5c4d4 /modules/drawers/Border.qml | |
| parent | wallpaper: fix flash when changing wallpapers (diff) | |
| download | caelestia-shell-ac2ef10d3f049c96086ef8c337b7820a8fac970a.tar.gz caelestia-shell-ac2ef10d3f049c96086ef8c337b7820a8fac970a.tar.bz2 caelestia-shell-ac2ef10d3f049c96086ef8c337b7820a8fac970a.zip | |
refactor: move drawers into separate module
Diffstat (limited to 'modules/drawers/Border.qml')
| -rw-r--r-- | modules/drawers/Border.qml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/modules/drawers/Border.qml b/modules/drawers/Border.qml new file mode 100644 index 0000000..124f73f --- /dev/null +++ b/modules/drawers/Border.qml @@ -0,0 +1,52 @@ +import "root:/widgets" +import "root:/services" +import "root:/config" +import Quickshell +import QtQuick +import QtQuick.Effects + +Item { + id: root + + required property ShellScreen screen + + anchors.fill: parent + + StyledRect { + id: rect + + anchors.fill: parent + color: Colours.alpha(BorderConfig.colour, false) + visible: false + } + + Item { + id: mask + + anchors.fill: parent + layer.enabled: true + visible: false + + Rectangle { + anchors.fill: parent + anchors.margins: BorderConfig.thickness + radius: BorderConfig.rounding + } + } + + MultiEffect { + anchors.fill: parent + maskEnabled: true + maskInverted: true + maskSource: mask + source: rect + maskThresholdMin: 0.5 + maskSpreadAtMin: 1 + } + + MouseArea { + anchors.fill: parent + hoverEnabled: true + onPositionChanged: event => Drawers.setPosForScreen(root.screen, event.x, event.y) + } +} |