summaryrefslogtreecommitdiff
path: root/modules/bar/components/workspaces
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-29 21:43:26 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-29 21:43:26 +1000
commit2be8327d161624f8d466a1fc3b1cfab351df378f (patch)
tree40b2af53e8d9ec13dc121b3a9e26bb9610e53781 /modules/bar/components/workspaces
parentbar: add missed colour animation (diff)
downloadcaelestia-shell-2be8327d161624f8d466a1fc3b1cfab351df378f.tar.gz
caelestia-shell-2be8327d161624f8d466a1fc3b1cfab351df378f.tar.bz2
caelestia-shell-2be8327d161624f8d466a1fc3b1cfab351df378f.zip
bar: occupied workspaces no need for layout
Can just use anchors and bindings instead
Diffstat (limited to 'modules/bar/components/workspaces')
-rw-r--r--modules/bar/components/workspaces/OccupiedBg.qml15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/bar/components/workspaces/OccupiedBg.qml b/modules/bar/components/workspaces/OccupiedBg.qml
index 520443f..194846a 100644
--- a/modules/bar/components/workspaces/OccupiedBg.qml
+++ b/modules/bar/components/workspaces/OccupiedBg.qml
@@ -5,7 +5,7 @@ import "root:/config"
import QtQuick
import QtQuick.Layouts
-BoxLayout {
+Item {
id: root
required property bool vertical
@@ -13,9 +13,8 @@ BoxLayout {
required property var occupied
required property int groupOffset
- anchors.centerIn: parent
+ anchors.fill: parent
opacity: BarConfig.workspaces.occupiedBg ? 1 : 0
- spacing: 0
z: -1
Repeater {
@@ -37,9 +36,13 @@ BoxLayout {
topRightRadius: roundRight
bottomRightRadius: roundRight
- // Ugh stupid size errors on reload
- Layout.preferredWidth: root.vertical ? BarConfig.sizes.innerHeight : root.workspaces[index]?.width ?? 1
- Layout.preferredHeight: root.vertical ? root.workspaces[index]?.height ?? 1 : BarConfig.sizes.innerHeight
+ x: root.workspaces[index]?.x ?? 0
+ y: root.workspaces[index]?.y ?? 0
+ width: root.vertical ? BarConfig.sizes.innerHeight : root.workspaces[index]?.width ?? 1
+ height: root.vertical ? root.workspaces[index]?.height ?? 1 : BarConfig.sizes.innerHeight
+
+ anchors.horizontalCenter: root.vertical ? parent.horizontalCenter : undefined
+ anchors.verticalCenter: root.vertical ? undefined : parent.verticalCenter
states: [
State {