change animation logic in ws

This commit is contained in:
lucy 2026-02-09 22:54:58 +01:00
parent 4038309a4d
commit 471f9bd5b6

View File

@ -38,22 +38,21 @@ Rectangle {
} }
required property var modelData required property var modelData
width: modelData.focused ? 40 : 20 width: !modelData.focused ? 20 : 40
height: isOnMon ? Settings.config.barHeight - Settings.config.barHeight / 2 : 0 height: isOnMon ? Settings.config.barHeight - Settings.config.barHeight / 2 : 0
color: modelData.focused ? Colors.primary : Colors.surfaceContainerHigh color: modelData.focused ? Colors.primary : Colors.surfaceContainerHigh
Behavior on width { Behavior on width {
NumberAnimation { NumberAnimation {
duration: 200 duration: 500
easing.type: Easing.BezierSpline easing.type: Easing.InOutBack
easing.bezierCurve: [0.34, 0.80, 0.34, 1.00, 1, 1]
} }
} }
CustomText { CustomText {
anchors.centerIn: workspaceNumber anchors.centerIn: workspaceNumber
text: parent.modelData.id text: parent.modelData.id
color: modelData.focused ? Colors.onPrimaryColor : Colors.onSurfaceColor color: parent.modelData.focused ? Colors.onPrimaryColor : Colors.onSurfaceColor
opacity: workspaceNumber.modelData.focused ? 1 : 0.5 opacity: workspaceNumber.modelData.focused ? 1 : 0.5
} }
MouseArea { MouseArea {