From 96c8226def4c30aa884f47a95e8a0cd845e4e566 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 30 Apr 2025 13:52:02 +1000 Subject: bar: some workspaces optimisations --- modules/bar/components/workspaces/ActiveIndicator.qml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/bar/components/workspaces') diff --git a/modules/bar/components/workspaces/ActiveIndicator.qml b/modules/bar/components/workspaces/ActiveIndicator.qml index f8b0deb..7e7ad8d 100644 --- a/modules/bar/components/workspaces/ActiveIndicator.qml +++ b/modules/bar/components/workspaces/ActiveIndicator.qml @@ -14,10 +14,9 @@ Rectangle { required property real maskHeight required property int groupOffset - property int currentIdx: (Hyprland.activeWorkspace?.id ?? 1) - 1 - groupOffset - property int lastIdx: currentIdx + property int currentIdx: Hyprland.activeWsId - 1 - groupOffset property real leading: workspaces[currentIdx][vertical ? "y" : "x"] - property real trailing: workspaces[lastIdx][vertical ? "y" : "x"] + property real trailing: workspaces[currentIdx][vertical ? "y" : "x"] property real currentSize: workspaces[currentIdx][vertical ? "height" : "width"] property real size: Math.abs(leading - trailing) + currentSize property real offset: Math.min(leading, trailing) -- cgit v1.2.3-freya