diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-18 15:19:15 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-18 15:19:15 +1000 |
| commit | 85d575f6c18017693cb2f3ab07314a0cf43adbe6 (patch) | |
| tree | 89540859a71162c28c8419af49c75cc3634e6b70 /modules/notifications/Background.qml | |
| parent | launcher: fix open anim (diff) | |
| download | caelestia-shell-85d575f6c18017693cb2f3ab07314a0cf43adbe6.tar.gz caelestia-shell-85d575f6c18017693cb2f3ab07314a0cf43adbe6.tar.bz2 caelestia-shell-85d575f6c18017693cb2f3ab07314a0cf43adbe6.zip | |
feat: add sidebar
WIP
Diffstat (limited to 'modules/notifications/Background.qml')
| -rw-r--r-- | modules/notifications/Background.qml | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/modules/notifications/Background.qml b/modules/notifications/Background.qml index 47ec54a..a44cb19 100644 --- a/modules/notifications/Background.qml +++ b/modules/notifications/Background.qml @@ -1,7 +1,6 @@ import qs.components import qs.services import qs.config -import Quickshell import QtQuick import QtQuick.Shapes @@ -9,10 +8,10 @@ ShapePath { id: root required property Wrapper wrapper + required property var sidebar readonly property real rounding: Config.border.rounding readonly property bool flatten: wrapper.height < rounding * 2 readonly property real roundingY: flatten ? wrapper.height / 2 : rounding - property real fullHeightRounding: wrapper.height >= QsWindow.window?.height - Config.border.thickness * 2 ? -rounding : rounding strokeWidth: -1 fillColor: Colours.palette.m3surface @@ -32,14 +31,14 @@ ShapePath { relativeY: root.wrapper.height - root.roundingY * 2 } PathArc { - relativeX: root.fullHeightRounding + relativeX: root.sidebar.notifsRoundingX relativeY: root.roundingY - radiusX: Math.abs(root.fullHeightRounding) + radiusX: root.sidebar.notifsRoundingX radiusY: Math.min(root.rounding, root.wrapper.height) - direction: root.fullHeightRounding < 0 ? PathArc.Clockwise : PathArc.Counterclockwise + direction: PathArc.Counterclockwise } PathLine { - relativeX: root.wrapper.height > 0 ? root.wrapper.width - root.rounding - root.fullHeightRounding : root.wrapper.width + relativeX: root.wrapper.height > 0 ? root.wrapper.width - root.rounding - root.sidebar.notifsRoundingX : root.wrapper.width relativeY: 0 } PathArc { @@ -52,8 +51,4 @@ ShapePath { Behavior on fillColor { CAnim {} } - - Behavior on fullHeightRounding { - Anim {} - } } |