From 1e800c2c1177525953404cdd2a7898f78e77ccdd Mon Sep 17 00:00:00 2001 From: lucy Date: Thu, 12 Mar 2026 17:07:46 +0100 Subject: [PATCH] make animations in ws elastic with overshoot --- Colors.qml | 88 ++++++++++++++++++------------------- modules/Bar/Bar.qml | 4 +- modules/Bar/Clock.qml | 4 +- modules/Bar/MPris.qml | 4 +- modules/Bar/StatusIcons.qml | 4 +- modules/Bar/Title.qml | 4 +- modules/Bar/Tray.qml | 4 +- modules/Bar/Ws.qml | 8 ++-- settings/settings.json | 4 +- widgets/CIcon.qml | 2 +- 10 files changed, 63 insertions(+), 63 deletions(-) diff --git a/Colors.qml b/Colors.qml index 5f7b9e8..90eb2f7 100644 --- a/Colors.qml +++ b/Colors.qml @@ -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" } diff --git a/modules/Bar/Bar.qml b/modules/Bar/Bar.qml index 6074a4c..88ddc67 100644 --- a/modules/Bar/Bar.qml +++ b/modules/Bar/Bar.qml @@ -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 {} diff --git a/modules/Bar/Clock.qml b/modules/Bar/Clock.qml index 671fa2f..e6f9361 100644 --- a/modules/Bar/Clock.qml +++ b/modules/Bar/Clock.qml @@ -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 diff --git a/modules/Bar/MPris.qml b/modules/Bar/MPris.qml index 46f6fda..6cce13b 100644 --- a/modules/Bar/MPris.qml +++ b/modules/Bar/MPris.qml @@ -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 diff --git a/modules/Bar/StatusIcons.qml b/modules/Bar/StatusIcons.qml index 5b5acc6..837e5d7 100644 --- a/modules/Bar/StatusIcons.qml +++ b/modules/Bar/StatusIcons.qml @@ -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 diff --git a/modules/Bar/Title.qml b/modules/Bar/Title.qml index 40f62d8..d4297a3 100644 --- a/modules/Bar/Title.qml +++ b/modules/Bar/Title.qml @@ -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 diff --git a/modules/Bar/Tray.qml b/modules/Bar/Tray.qml index 54750e1..4c73151 100644 --- a/modules/Bar/Tray.qml +++ b/modules/Bar/Tray.qml @@ -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 diff --git a/modules/Bar/Ws.qml b/modules/Bar/Ws.qml index 5195240..82eab9d 100644 --- a/modules/Bar/Ws.qml +++ b/modules/Bar/Ws.qml @@ -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 { diff --git a/settings/settings.json b/settings/settings.json index 0da9e17..81021a5 100644 --- a/settings/settings.json +++ b/settings/settings.json @@ -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 } diff --git a/widgets/CIcon.qml b/widgets/CIcon.qml index 15ce55d..5a93d82 100644 --- a/widgets/CIcon.qml +++ b/widgets/CIcon.qml @@ -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 {