diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-29 12:34:29 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-29 12:34:29 +1000 |
| commit | 2c7e9dd221d8dc2651a811c23b7cfc45ba8404c3 (patch) | |
| tree | 2264265e2f9cd5d14a0c1cf481a4fbe11b654adc /modules/bar/components/workspaces/Workspace.qml | |
| parent | refactor: workspaces use inner bar height (diff) | |
| download | caelestia-shell-2c7e9dd221d8dc2651a811c23b7cfc45ba8404c3.tar.gz caelestia-shell-2c7e9dd221d8dc2651a811c23b7cfc45ba8404c3.tar.bz2 caelestia-shell-2c7e9dd221d8dc2651a811c23b7cfc45ba8404c3.zip | |
refactor: move active workspace indicator to new file
Diffstat (limited to 'modules/bar/components/workspaces/Workspace.qml')
| -rw-r--r-- | modules/bar/components/workspaces/Workspace.qml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/bar/components/workspaces/Workspace.qml b/modules/bar/components/workspaces/Workspace.qml index e404c83..61192c2 100644 --- a/modules/bar/components/workspaces/Workspace.qml +++ b/modules/bar/components/workspaces/Workspace.qml @@ -5,14 +5,16 @@ import QtQuick.Layouts StyledText { required property int index - required property BoxLayout layout + required property bool vertical + required property bool homogenous required property var occupied + readonly property bool isWorkspace: true // Flag for finding workspace children text: index + 1 color: BarConfig.workspaces.occupiedBg || occupied[index + 1] ? Appearance.colours.text : Appearance.colours.subtext0 horizontalAlignment: StyledText.AlignHCenter - Layout.preferredWidth: layout.homogenous && !layout.vertical ? BarConfig.sizes.innerHeight : -1 - Layout.preferredHeight: layout.homogenous && layout.vertical ? BarConfig.sizes.innerHeight : -1 + Layout.preferredWidth: homogenous && !vertical ? BarConfig.sizes.innerHeight : -1 + Layout.preferredHeight: homogenous && vertical ? BarConfig.sizes.innerHeight : -1 } |