diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2026-01-16 01:55:20 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2026-01-16 01:59:20 +1100 |
| commit | 33c1c694de3c214306f72c16f7581cd93886dc6b (patch) | |
| tree | c7e72db99b3b3f0682343131c8bbf0c6268ee655 /modules/bar/components/workspaces/ActiveIndicator.qml | |
| parent | internal: no async loaders (diff) | |
| download | caelestia-shell-33c1c694de3c214306f72c16f7581cd93886dc6b.tar.gz caelestia-shell-33c1c694de3c214306f72c16f7581cd93886dc6b.tar.bz2 caelestia-shell-33c1c694de3c214306f72c16f7581cd93886dc6b.zip | |
internal: fix errors due to sync loaders
Diffstat (limited to 'modules/bar/components/workspaces/ActiveIndicator.qml')
| -rw-r--r-- | modules/bar/components/workspaces/ActiveIndicator.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/bar/components/workspaces/ActiveIndicator.qml b/modules/bar/components/workspaces/ActiveIndicator.qml index 3e265e2..dae54b3 100644 --- a/modules/bar/components/workspaces/ActiveIndicator.qml +++ b/modules/bar/components/workspaces/ActiveIndicator.qml @@ -18,9 +18,9 @@ StyledRect { return i % Config.bar.workspaces.shown; } - property real leading: workspaces.itemAt(currentWsIdx)?.y ?? 0 - property real trailing: workspaces.itemAt(currentWsIdx)?.y ?? 0 - property real currentSize: workspaces.itemAt(currentWsIdx)?.size ?? 0 + property real leading: workspaces.count > 0 ? workspaces.itemAt(currentWsIdx)?.y ?? 0 : 0 + property real trailing: workspaces.count > 0 ? workspaces.itemAt(currentWsIdx)?.y ?? 0 : 0 + property real currentSize: workspaces.count > 0 ? workspaces.itemAt(currentWsIdx)?.size ?? 0 : 0 property real offset: Math.min(leading, trailing) property real size: { const s = Math.abs(leading - trailing) + currentSize; |