summaryrefslogtreecommitdiff
path: root/modules/bar/components/workspaces/Workspace.qml
blob: 61192c2d64485af5b167668ffbdb2dc950f86ae2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import "root:/widgets"
import "root:/services"
import "root:/config"
import QtQuick.Layouts

StyledText {
    required property int index
    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: homogenous && !vertical ? BarConfig.sizes.innerHeight : -1
    Layout.preferredHeight: homogenous && vertical ? BarConfig.sizes.innerHeight : -1
}