summaryrefslogtreecommitdiff
path: root/modules/bar/components
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-03-17 12:36:07 -0400
committerFreya Murphy <freya@freyacat.org>2026-03-17 12:36:07 -0400
commitd67728f19fc2ba312e043891bfe77f63b164ea8a (patch)
tree43f9f8a076745873ba436140db28a5aec0c7ace4 /modules/bar/components
parentmake color rendering better, wth was the orig doing (diff)
downloadcaelestia-shell-d67728f19fc2ba312e043891bfe77f63b164ea8a.tar.gz
caelestia-shell-d67728f19fc2ba312e043891bfe77f63b164ea8a.tar.bz2
caelestia-shell-d67728f19fc2ba312e043891bfe77f63b164ea8a.zip
fix workspace indicator offset
Diffstat (limited to 'modules/bar/components')
-rw-r--r--modules/bar/components/workspaces/ActiveIndicator.qml23
1 files changed, 7 insertions, 16 deletions
diff --git a/modules/bar/components/workspaces/ActiveIndicator.qml b/modules/bar/components/workspaces/ActiveIndicator.qml
index cd5ce35..0416dfd 100644
--- a/modules/bar/components/workspaces/ActiveIndicator.qml
+++ b/modules/bar/components/workspaces/ActiveIndicator.qml
@@ -11,27 +11,18 @@ StyledRect {
required property Repeater workspaces
required property Item mask
- readonly property int currentWsIdx: {
- let wss = Hypr.workspaces.values;
- for (let i = 0; i < wss.length; i++) {
- let ws = wss[i];
- if (ws.id == activeWsId)
- return i;
+ readonly property var currentWs: {
+ for (let i = 0; i < workspaces.count; i++) {
+ const ws = workspaces.itemAt(i);
+ if (ws && ws.isActive)
+ return ws;
}
}
- property real currentSize: workspaces.itemAt(currentWsIdx)?.size ?? 0
- property real offset: workspaces.itemAt(currentWsIdx)?.y ?? 0
+ property real currentSize: currentWs?.size ?? 0
+ property real offset: currentWs?.y ?? 0
property real size: Config.bar.sizes.innerWidth - Appearance.padding.small * 2
- property int cWs
- property int lastWs
-
- onCurrentWsIdxChanged: {
- lastWs = cWs;
- cWs = currentWsIdx;
- }
-
clip: true
y: offset + mask.y
implicitWidth: size