add animation to ws
This commit is contained in:
parent
ffd60a616a
commit
05413904df
2 changed files with 26 additions and 18 deletions
|
|
@ -15,7 +15,7 @@ Rectangle {
|
|||
property HyprlandMonitor hyprBarScreen: Hyprland.monitorFor(root.barScreen)
|
||||
radius: Config.rounding
|
||||
color: Colors.base01
|
||||
implicitWidth: wsLayout.implicitWidth
|
||||
implicitWidth: wsLayout.implicitWidth
|
||||
implicitHeight: moduleHeight
|
||||
|
||||
RowLayout {
|
||||
|
|
@ -31,7 +31,7 @@ Rectangle {
|
|||
id: wsWrapper
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
implicitHeight: root.moduleHeight - 4
|
||||
implicitWidth: modelData.active ? 48 : 32
|
||||
implicitWidth: modelData.active ? 48 : 24
|
||||
parent: wsLayout
|
||||
color: modelData.active ? Colors.base0D : Colors.base01
|
||||
radius: Config.rounding
|
||||
|
|
@ -42,6 +42,14 @@ Rectangle {
|
|||
text: wsWrapper.modelData.id
|
||||
color: parent.modelData.active ? Colors.base00 : Colors.base07
|
||||
}
|
||||
Behavior on implicitWidth {
|
||||
NumberAnimation {
|
||||
easing.type: Easing.InOutBack
|
||||
easing.amplitude: 2
|
||||
duration: 400
|
||||
easing.overshoot: 2
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
id: clickHandler
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
Loading…
Reference in a new issue