summaryrefslogtreecommitdiff
path: root/modules/bar/components/workspaces/Workspace.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-27 10:42:08 +0800
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-27 10:42:08 +0800
commit63da636144635e5aa6b7ff1a2d2eec2a1e35aafa (patch)
treecd5461058c7afedb2d17f474f13ee218759519ba /modules/bar/components/workspaces/Workspace.qml
parentdrawers: dont use hyprland cursor pos (diff)
downloadcaelestia-shell-63da636144635e5aa6b7ff1a2d2eec2a1e35aafa.tar.gz
caelestia-shell-63da636144635e5aa6b7ff1a2d2eec2a1e35aafa.tar.bz2
caelestia-shell-63da636144635e5aa6b7ff1a2d2eec2a1e35aafa.zip
internal: bar only vertical
The bar can only be vertical Remove box, boxlayout and anchortext Add StyledClippingRect
Diffstat (limited to 'modules/bar/components/workspaces/Workspace.qml')
-rw-r--r--modules/bar/components/workspaces/Workspace.qml28
1 files changed, 18 insertions, 10 deletions
diff --git a/modules/bar/components/workspaces/Workspace.qml b/modules/bar/components/workspaces/Workspace.qml
index 7f4bc68..fa5fe62 100644
--- a/modules/bar/components/workspaces/Workspace.qml
+++ b/modules/bar/components/workspaces/Workspace.qml
@@ -10,20 +10,19 @@ Item {
id: root
required property int index
- required property bool vertical
required property var occupied
required property int groupOffset
readonly property bool isWorkspace: true // Flag for finding workspace children
// Unanimated prop for others to use as reference
- readonly property real size: childrenRect[vertical ? "height" : "width"] + (hasWindows ? Appearance.padding.normal : 0)
+ readonly property real size: childrenRect.height + (hasWindows ? Appearance.padding.normal : 0)
readonly property int ws: groupOffset + index + 1
readonly property bool isOccupied: occupied[ws] ?? false
readonly property bool hasWindows: isOccupied && BarConfig.workspaces.showWindows
- Layout.preferredWidth: childrenRect.width + (hasWindows && !vertical ? Appearance.padding.normal : 0)
- Layout.preferredHeight: childrenRect.height + (hasWindows && vertical ? Appearance.padding.normal : 0)
+ Layout.preferredWidth: childrenRect.width
+ Layout.preferredHeight: size
StyledText {
id: indicator
@@ -43,16 +42,25 @@ Item {
}
Loader {
+ id: windows
+
active: BarConfig.workspaces.showWindows
asynchronous: true
- anchors.left: root.vertical ? undefined : indicator.right
- anchors.top: root.vertical ? indicator.bottom : undefined
- anchors.verticalCenter: root.vertical ? undefined : indicator.verticalCenter
- anchors.horizontalCenter: root.vertical ? indicator.horizontalCenter : undefined
+ anchors.horizontalCenter: indicator.horizontalCenter
+ anchors.top: indicator.bottom
+
+ sourceComponent: Column {
+ spacing: Appearance.spacing.small
- sourceComponent: Box {
- vertical: root.vertical
+ add: Transition {
+ Anim {
+ properties: "scale"
+ from: 0
+ to: 1
+ easing.bezierCurve: Appearance.anim.curves.standardDecel
+ }
+ }
Repeater {
model: ScriptModel {