From f3992e4b35c0a507730029057c9115360c2eb15f Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 18 Jul 2025 14:01:58 +0800 Subject: workspace: shadow on active --- bar/Workspace.qml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 -- cgit v1.2.3