make animations in ws elastic with overshoot

This commit is contained in:
lucy 2026-03-12 17:07:46 +01:00
parent 83645e9a91
commit 1e800c2c11
10 changed files with 63 additions and 63 deletions

View File

@ -4,104 +4,104 @@ import Quickshell
Singleton {
readonly property color background: "#131318"
readonly property color background: "#12140e"
readonly property color error: "#ffb4ab"
readonly property color error_container: "#93000a"
readonly property color inverse_on_surface: "#313036"
readonly property color inverse_on_surface: "#2f312a"
readonly property color inverse_primary: "#5a5891"
readonly property color inverse_primary: "#4d662a"
readonly property color inverse_surface: "#e5e1e9"
readonly property color inverse_surface: "#e2e3d8"
readonly property color on_background: "#e5e1e9"
readonly property color on_background: "#e2e3d8"
readonly property color on_error: "#690005"
readonly property color on_error_container: "#ffdad6"
readonly property color on_primary: "#2c2960"
readonly property color on_primary: "#203600"
readonly property color on_primary_container: "#e3dfff"
readonly property color on_primary_container: "#ceeda2"
readonly property color on_primary_fixed: "#16134a"
readonly property color on_primary_fixed: "#112000"
readonly property color on_primary_fixed_variant: "#424078"
readonly property color on_primary_fixed_variant: "#364e15"
readonly property color on_secondary: "#2f2e42"
readonly property color on_secondary: "#2a331e"
readonly property color on_secondary_container: "#e3e0f9"
readonly property color on_secondary_container: "#dce7c7"
readonly property color on_secondary_fixed: "#1a1a2c"
readonly property color on_secondary_fixed: "#161e0b"
readonly property color on_secondary_fixed_variant: "#464559"
readonly property color on_secondary_fixed_variant: "#414a33"
readonly property color on_surface: "#e5e1e9"
readonly property color on_surface: "#e2e3d8"
readonly property color on_surface_variant: "#c8c5d0"
readonly property color on_surface_variant: "#c5c8b9"
readonly property color on_tertiary: "#472639"
readonly property color on_tertiary: "#003734"
readonly property color on_tertiary_container: "#ffd8ea"
readonly property color on_tertiary_container: "#bcece7"
readonly property color on_tertiary_fixed: "#2f1123"
readonly property color on_tertiary_fixed: "#00201e"
readonly property color on_tertiary_fixed_variant: "#603b50"
readonly property color on_tertiary_fixed_variant: "#1f4e4b"
readonly property color outline: "#928f9a"
readonly property color outline: "#8f9285"
readonly property color outline_variant: "#47464f"
readonly property color outline_variant: "#44483d"
readonly property color primary: "#c3c0ff"
readonly property color primary: "#b3d089"
readonly property color primary_container: "#424078"
readonly property color primary_container: "#364e15"
readonly property color primary_fixed: "#e3dfff"
readonly property color primary_fixed: "#ceeda2"
readonly property color primary_fixed_dim: "#c3c0ff"
readonly property color primary_fixed_dim: "#b3d089"
readonly property color scrim: "#000000"
readonly property color secondary: "#c7c4dd"
readonly property color secondary: "#c0cbac"
readonly property color secondary_container: "#464559"
readonly property color secondary_container: "#414a33"
readonly property color secondary_fixed: "#e3e0f9"
readonly property color secondary_fixed: "#dce7c7"
readonly property color secondary_fixed_dim: "#c7c4dd"
readonly property color secondary_fixed_dim: "#c0cbac"
readonly property color shadow: "#000000"
readonly property color source_color: "#6e6ca2"
readonly property color source_color: "#88a95b"
readonly property color surface: "#131318"
readonly property color surface: "#12140e"
readonly property color surface_bright: "#39383f"
readonly property color surface_bright: "#383a32"
readonly property color surface_container: "#201f25"
readonly property color surface_container: "#1e201a"
readonly property color surface_container_high: "#2a292f"
readonly property color surface_container_high: "#282b24"
readonly property color surface_container_highest: "#35343a"
readonly property color surface_container_highest: "#33362e"
readonly property color surface_container_low: "#1c1b21"
readonly property color surface_container_low: "#1a1c16"
readonly property color surface_container_lowest: "#0e0e13"
readonly property color surface_container_lowest: "#0d0f09"
readonly property color surface_dim: "#131318"
readonly property color surface_dim: "#12140e"
readonly property color surface_tint: "#c3c0ff"
readonly property color surface_tint: "#b3d089"
readonly property color surface_variant: "#47464f"
readonly property color surface_variant: "#44483d"
readonly property color tertiary: "#eab9d1"
readonly property color tertiary: "#a0d0cb"
readonly property color tertiary_container: "#603b50"
readonly property color tertiary_container: "#1f4e4b"
readonly property color tertiary_fixed: "#ffd8ea"
readonly property color tertiary_fixed: "#bcece7"
readonly property color tertiary_fixed_dim: "#eab9d1"
readonly property color tertiary_fixed_dim: "#a0d0cb"
}

View File

@ -30,7 +30,7 @@ Variants {
color: Colors.surface
RowLayout {
id: left
anchors.leftMargin: Settings.config.floating ? Settings.config.barHeight / 2 - 12 : 10
anchors.leftMargin: Settings.config.floating ? (Settings.config.barHeight / 1.5) / 6 : 10
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
@ -52,7 +52,7 @@ Variants {
anchors {
right: parent.right
verticalCenter: parent.verticalCenter
rightMargin: Settings.config.floating ? Settings.config.barHeight / 2 - 12 : 10
rightMargin: Settings.config.floating ? (Settings.config.barHeight / 1.5) / 6 : 10
}
Clock {}
StatusIcons {}

View File

@ -6,9 +6,9 @@ import qs.widgets
Rectangle {
id: root
color: Colors.surface_container
color: Colors.surface_container_low
implicitWidth: clockText.implicitWidth + 14
implicitHeight: Settings.config.barHeight / 2 + 6
implicitHeight: Settings.config.barHeight / 1.5
radius: Settings.config.rounding
SystemClock {
id: clock

View File

@ -8,9 +8,9 @@ import qs.widgets
Rectangle {
id: root
color: Colors.surface_container
color: Colors.surface_container_low
implicitWidth: songLayout.implicitWidth + 14
implicitHeight: Settings.config.barHeight / 2 + 6
implicitHeight: Settings.config.barHeight / 1.5
radius: Settings.config.rounding
property var spotify: root.getSpotify()
visible: getSpotify() == null ? false : true

View File

@ -8,9 +8,9 @@ import qs.widgets
Rectangle {
id: root
color: Colors.surface_container
color: Colors.surface_container_low
implicitWidth: iconLayout.implicitWidth + 14
implicitHeight: Settings.config.barHeight / 2 + 6
implicitHeight: Settings.config.barHeight / 1.5
radius: Settings.config.rounding
property var battery: UPower.displayDevice
property var percentage: UPower.displayDevice.percentage

View File

@ -11,8 +11,8 @@ Rectangle {
property var activeWindow: ToplevelManager.activeToplevel
property bool active: activeWindow ? activeWindow.activated ? true : false : false
radius: Settings.config.rounding
color: active ? Colors.surface_container : "transparent"
implicitHeight: Settings.config.barHeight / 2 + 6
color: active ? Colors.surface_container_low : "transparent"
implicitHeight: Settings.config.barHeight / 1.5
implicitWidth: titleText.width + 14
RowLayout {
anchors.centerIn: parent

View File

@ -7,9 +7,9 @@ import QtQuick.Layouts
Rectangle {
id: root
implicitWidth: trayRow.implicitWidth + 14
implicitHeight: trayRow.implicitHeight + 6
implicitHeight: Settings.config.barHeight / 1.5
visible: trayRep.count > 0
color: Colors.surface_container
color: Colors.surface_container_low
radius: Settings.config.rounding
RowLayout {
id: trayRow

View File

@ -24,7 +24,7 @@ Rectangle {
delegate: Rectangle {
id: wsRect
implicitWidth: modelData.focused ? Settings.config.barHeight * 1.5 : Settings.config.barHeight / 2 + 10
implicitHeight: Settings.config.barHeight / 2 + 6
implicitHeight: Settings.config.barHeight / 1.5
visible: modelData.id < 0 ? false : modelData.monitor?.name == wsWrap.barScreen.name
required property var modelData
color: modelData.focused ? Colors.primary_container : Colors.surface_container_low
@ -38,10 +38,10 @@ Rectangle {
Behavior on implicitWidth {
NumberAnimation {
easing {
type: Easing.InOutBack
overshoot: 3
type: Easing.OutBack
overshoot: 2
}
duration: 500
duration: 400
}
}
MouseArea {

View File

@ -1,10 +1,10 @@
{
"barHeight": 32,
"currentWall": "/home/lucy/.walls/eva13.png",
"currentWall": "/home/lucy/.walls/Kita.png",
"floating": true,
"font": "Maple Mono NF",
"fontSize": 14,
"margins": 10,
"rounding": 15,
"rounding": 16,
"wallswitchershown": false
}

View File

@ -5,7 +5,7 @@ import qs.settings
Text {
id: root
color: Colors.on_surface
property real iconSize: 14
property real iconSize: 12
property real fill: 1
renderType: Text.NativeRendering
font {