From 2c7e9dd221d8dc2651a811c23b7cfc45ba8404c3 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 29 Apr 2025 12:34:29 +1000 Subject: refactor: move active workspace indicator to new file --- modules/bar/components/workspaces/Workspace.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'modules/bar/components/workspaces/Workspace.qml') 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 } -- cgit v1.2.3-freya