diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-18 14:01:58 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-18 14:01:58 +0800 |
| commit | f3992e4b35c0a507730029057c9115360c2eb15f (patch) | |
| tree | 44caeb6d00e95435dfacaecff2833afd61738cb5 | |
| parent | 5f64e9a4d86a12b0d3d7d543ce6fae644ba2d911 (diff) | |
workspace: shadow on active
| -rw-r--r-- | bar/Workspace.qml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bar/Workspace.qml b/bar/Workspace.qml index 6f3e3d4..2759442 100644 --- a/bar/Workspace.qml +++ b/bar/Workspace.qml @@ -3,6 +3,7 @@ import QtQuick.Layouts import Quickshell import Quickshell.Hyprland import Quickshell.Wayland +import Qt5Compat.GraphicalEffects import qs.config import qs.components @@ -31,6 +32,27 @@ Item { }; } + DropShadow { + anchors.fill: activeRect + source: activeRect + radius: 8 + cached: true + color: root.activeOccupied ? WallustColors.color4 : WallustColors.foreground + opacity: root.activeOccupied ? Bar.workspaceActiveOpacity : Bar.workspaceEmptyOpacity / 3 + + Behavior on color { + NumberAnimation { + duration: Bar.workspaceAnimationDuration + easing.type: Easing.InOutQuad + } + } + Behavior on opacity { + NumberAnimation { + duration: Bar.workspaceAnimationDuration + easing.type: Easing.InOutQuad + } + } + } Rectangle { id: activeRect x: activeRectX |
