From 3284e4154535f45e67a7229ec9f3eafead5dd158 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 3 May 2025 18:12:06 +0200 Subject: [PATCH] animations: new curve --- .config/quickshell/modules/bar/Battery.qml | 10 +- .config/quickshell/modules/bar/Resource.qml | 10 +- .../modules/bar/SmallCircleButton.qml | 5 +- .config/quickshell/modules/bar/Workspaces.qml | 45 +++--- .../quickshell/modules/common/Appearance.qml | 32 ++++- .../modules/common/widgets/DialogButton.qml | 10 +- .../modules/common/widgets/MenuButton.qml | 10 +- .../modules/common/widgets/NavRailButton.qml | 10 +- .../common/widgets/NotificationWidget.qml | 54 +++++--- .../common/widgets/PrimaryTabButton.qml | 15 +- .../common/widgets/SecondaryTabButton.qml | 15 +- .../common/widgets/StyledProgressBar.qml | 5 +- .../modules/common/widgets/StyledSlider.qml | 12 +- .../modules/common/widgets/StyledSwitch.qml | 30 ++-- .../modules/common/widgets/StyledToolTip.qml | 10 +- .../modules/overview/OverviewWindow.qml | 25 ++-- .../modules/overview/SearchItem.qml | 2 +- .../modules/overview/SearchWidget.qml | 49 +++++-- .../quickshell/modules/session/Session.qml | 2 +- .../modules/session/SessionActionButton.qml | 5 +- .../quickshell/modules/sidebarLeft/Anime.qml | 128 ++++++++++++------ .../modules/sidebarLeft/anime/BooruImage.qml | 41 +++++- .../sidebarLeft/anime/BooruResponse.qml | 10 +- .../sidebarRight/BottomWidgetGroup.qml | 19 +-- .../calendar/CalendarDayButton.qml | 10 +- .../calendar/CalendarHeaderButton.qml | 7 +- .../notifications/NotificationList.qml | 5 +- .../NotificationStatusButton.qml | 7 +- .../quickToggles/QuickToggleButton.qml | 10 +- .../modules/sidebarRight/todo/TaskList.qml | 12 +- .../todo/TodoItemActionButton.qml | 7 +- .../modules/sidebarRight/todo/TodoWidget.qml | 17 +-- .../volumeMixer/AudioDeviceSelectorButton.qml | 5 +- .../sidebarRight/volumeMixer/VolumeMixer.qml | 35 +++-- .config/quickshell/services/AppSearch.qml | 9 +- 35 files changed, 442 insertions(+), 236 deletions(-) diff --git a/.config/quickshell/modules/bar/Battery.qml b/.config/quickshell/modules/bar/Battery.qml index 8e22532af..b4142dd1c 100644 --- a/.config/quickshell/modules/bar/Battery.qml +++ b/.config/quickshell/modules/bar/Battery.qml @@ -31,8 +31,9 @@ Rectangle { Behavior on implicitWidth { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } @@ -76,8 +77,9 @@ Rectangle { Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/bar/Resource.qml b/.config/quickshell/modules/bar/Resource.qml index 9457c4487..40c2aff5d 100644 --- a/.config/quickshell/modules/bar/Resource.qml +++ b/.config/quickshell/modules/bar/Resource.qml @@ -43,8 +43,9 @@ Item { Behavior on x { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -52,8 +53,9 @@ Item { Behavior on implicitWidth { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } \ No newline at end of file diff --git a/.config/quickshell/modules/bar/SmallCircleButton.qml b/.config/quickshell/modules/bar/SmallCircleButton.qml index 97cb93079..32c79d352 100644 --- a/.config/quickshell/modules/bar/SmallCircleButton.qml +++ b/.config/quickshell/modules/bar/SmallCircleButton.qml @@ -25,8 +25,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/bar/Workspaces.qml b/.config/quickshell/modules/bar/Workspaces.qml index 7b3cf37cc..101baf296 100644 --- a/.config/quickshell/modules/bar/Workspaces.qml +++ b/.config/quickshell/modules/bar/Workspaces.qml @@ -120,21 +120,24 @@ Item { Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } Behavior on radiusLeft { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } Behavior on radiusRight { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -202,16 +205,18 @@ Item { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } @@ -236,26 +241,30 @@ Item { Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on anchors.bottomMargin { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on anchors.rightMargin { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on implicitSize { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } } diff --git a/.config/quickshell/modules/common/Appearance.qml b/.config/quickshell/modules/common/Appearance.qml index cb000bfab..cf3e49f8d 100644 --- a/.config/quickshell/modules/common/Appearance.qml +++ b/.config/quickshell/modules/common/Appearance.qml @@ -6,6 +6,7 @@ pragma ComponentBehavior: Bound Singleton { property QtObject m3colors property QtObject animation + property QtObject animationCurves property QtObject colors property QtObject rounding property QtObject font @@ -171,24 +172,41 @@ Singleton { } } + animationCurves: QtObject { + readonly property list emphasized: [0.05, 0, 2 / 15, 0.06, 1 / 6, 0.4, 5 / 24, 0.82, 0.25, 1, 1, 1] + readonly property list emphasizedAccel: [0.3, 0, 0.8, 0.15, 1, 1] + readonly property list emphasizedDecel: [0.05, 0.7, 0.1, 1, 1, 1] + readonly property list standard: [0.2, 0, 0, 1, 1, 1] + readonly property list standardAccel: [0.3, 0, 1, 1, 1, 1] + readonly property list standardDecel: [0, 0, 0, 1, 1, 1] + } + animation: QtObject { - property QtObject elementDecel: QtObject { - property int duration: 200 - property int type: Easing.OutCirc + property QtObject elementMove: QtObject { + property int duration: 450 + property int type: Easing.BezierSpline + property list bezierCurve: animationCurves.emphasized property int velocity: 650 } - property QtObject elementDecelFast: QtObject { - property int duration: 140 - property int type: Easing.OutCirc + property QtObject elementMoveFast: QtObject { + property int duration: 200 + property int type: Easing.BezierSpline + property list bezierCurve: animationCurves.standardDecel property int velocity: 850 } + property QtObject scroll: QtObject { + property int duration: 400 + property int type: Easing.BezierSpline + property list bezierCurve: animationCurves.standardDecel + } property QtObject menuDecel: QtObject { property int duration: 350 property int type: Easing.OutExpo } property QtObject positionShift: QtObject { property int duration: 300 - property int type: Easing.InOutExpo + property int type: Easing.BezierSpline + property list bezierCurve: animationCurves.emphasized property int velocity: 650 } } diff --git a/.config/quickshell/modules/common/widgets/DialogButton.qml b/.config/quickshell/modules/common/widgets/DialogButton.qml index cc8ea6174..d4310dbdf 100644 --- a/.config/quickshell/modules/common/widgets/DialogButton.qml +++ b/.config/quickshell/modules/common/widgets/DialogButton.qml @@ -21,8 +21,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -41,8 +42,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } diff --git a/.config/quickshell/modules/common/widgets/MenuButton.qml b/.config/quickshell/modules/common/widgets/MenuButton.qml index 957c2229d..f5de52c5e 100644 --- a/.config/quickshell/modules/common/widgets/MenuButton.qml +++ b/.config/quickshell/modules/common/widgets/MenuButton.qml @@ -22,8 +22,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -42,8 +43,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } diff --git a/.config/quickshell/modules/common/widgets/NavRailButton.qml b/.config/quickshell/modules/common/widgets/NavRailButton.qml index 2ccbe5529..ed7b1f8f2 100644 --- a/.config/quickshell/modules/common/widgets/NavRailButton.qml +++ b/.config/quickshell/modules/common/widgets/NavRailButton.qml @@ -34,8 +34,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } MaterialSymbol { @@ -47,8 +48,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } diff --git a/.config/quickshell/modules/common/widgets/NotificationWidget.qml b/.config/quickshell/modules/common/widgets/NotificationWidget.qml index b8f58a463..c9df0c186 100644 --- a/.config/quickshell/modules/common/widgets/NotificationWidget.qml +++ b/.config/quickshell/modules/common/widgets/NotificationWidget.qml @@ -28,8 +28,9 @@ Item { Behavior on implicitHeight { enabled: enableAnimation NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } @@ -77,7 +78,7 @@ Item { Timer { id: destroyTimer1 - interval: Appearance.animation.elementDecelFast.duration + interval: Appearance.animation.elementMoveFast.duration repeat: false onTriggered: { notificationRowWrapper.anchors.top = undefined @@ -89,7 +90,7 @@ Item { Timer { id: destroyTimer2 - interval: Appearance.animation.elementDecelFast.duration + interval: Appearance.animation.elementMoveFast.duration repeat: false onTriggered: { root.destroy() @@ -186,15 +187,17 @@ Item { Behavior on x { enabled: enableAnimation NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on height { enabled: enableAnimation NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } } @@ -224,8 +227,9 @@ Item { Behavior on x { enabled: enableAnimation NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } @@ -241,8 +245,9 @@ Item { Behavior on implicitHeight { enabled: enableAnimation NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } @@ -400,8 +405,9 @@ Item { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } @@ -418,8 +424,9 @@ Item { rotation: expanded ? 180 : 0 Behavior on rotation { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } } @@ -486,20 +493,23 @@ Item { visible: opacity > 0 Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on height { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on implicitHeight { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } diff --git a/.config/quickshell/modules/common/widgets/PrimaryTabButton.qml b/.config/quickshell/modules/common/widgets/PrimaryTabButton.qml index 3a7565281..beb61f607 100644 --- a/.config/quickshell/modules/common/widgets/PrimaryTabButton.qml +++ b/.config/quickshell/modules/common/widgets/PrimaryTabButton.qml @@ -24,8 +24,9 @@ TabButton { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } @@ -43,8 +44,9 @@ TabButton { color: selected ? Appearance.m3colors.m3primary : Appearance.colors.colOnLayer1 Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } @@ -57,8 +59,9 @@ TabButton { text: buttonText Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } diff --git a/.config/quickshell/modules/common/widgets/SecondaryTabButton.qml b/.config/quickshell/modules/common/widgets/SecondaryTabButton.qml index 9a8f7e16a..20f338579 100644 --- a/.config/quickshell/modules/common/widgets/SecondaryTabButton.qml +++ b/.config/quickshell/modules/common/widgets/SecondaryTabButton.qml @@ -24,8 +24,9 @@ TabButton { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } @@ -43,8 +44,9 @@ TabButton { color: selected ? Appearance.m3colors.m3primary : Appearance.colors.colOnLayer1 Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } @@ -56,8 +58,9 @@ TabButton { text: buttonText Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } diff --git a/.config/quickshell/modules/common/widgets/StyledProgressBar.qml b/.config/quickshell/modules/common/widgets/StyledProgressBar.qml index 078570ffe..12b9c0cd2 100644 --- a/.config/quickshell/modules/common/widgets/StyledProgressBar.qml +++ b/.config/quickshell/modules/common/widgets/StyledProgressBar.qml @@ -16,8 +16,9 @@ ProgressBar { Behavior on value { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/common/widgets/StyledSlider.qml b/.config/quickshell/modules/common/widgets/StyledSlider.qml index 17433c591..f800e2a3d 100644 --- a/.config/quickshell/modules/common/widgets/StyledSlider.qml +++ b/.config/quickshell/modules/common/widgets/StyledSlider.qml @@ -24,14 +24,15 @@ Slider { Behavior on value { // This makes the adjusted value (like volume) shift smoothly SmoothedAnimation { - velocity: Appearance.animation.elementDecel.velocity + velocity: Appearance.animation.elementMove.velocity } } Behavior on handleMargins { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -92,8 +93,9 @@ Slider { Behavior on implicitWidth { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/common/widgets/StyledSwitch.qml b/.config/quickshell/modules/common/widgets/StyledSwitch.qml index 73734f3b1..8406a47d1 100644 --- a/.config/quickshell/modules/common/widgets/StyledSwitch.qml +++ b/.config/quickshell/modules/common/widgets/StyledSwitch.qml @@ -23,14 +23,16 @@ Switch { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } Behavior on border.color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } @@ -47,26 +49,30 @@ Switch { Behavior on anchors.leftMargin { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } Behavior on width { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } Behavior on height { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } diff --git a/.config/quickshell/modules/common/widgets/StyledToolTip.qml b/.config/quickshell/modules/common/widgets/StyledToolTip.qml index ff01a424f..5b37b2611 100644 --- a/.config/quickshell/modules/common/widgets/StyledToolTip.qml +++ b/.config/quickshell/modules/common/widgets/StyledToolTip.qml @@ -40,9 +40,11 @@ ToolTip { implicitWidth: tooltipTextObject.width + 2 * padding implicitHeight: tooltipTextObject.height + 2 * padding Behavior on opacity { - OpacityAnimator { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + NumberAnimation { + target: opacity + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } opacity: visible ? 1 : 0 @@ -50,7 +52,7 @@ ToolTip { StyledText { id: tooltipTextObject text: content - font.pixelSize: Appearance.font.pixelSize.smaller + font.pixelSize: Appearance.font.pixelSize.small color: Appearance.colors.colOnTooltip wrapMode: Text.Wrap } diff --git a/.config/quickshell/modules/overview/OverviewWindow.qml b/.config/quickshell/modules/overview/OverviewWindow.qml index 9be71a3d7..935960ad0 100644 --- a/.config/quickshell/modules/overview/OverviewWindow.qml +++ b/.config/quickshell/modules/overview/OverviewWindow.qml @@ -48,26 +48,30 @@ Rectangle { // Window Behavior on x { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on y { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on width { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on height { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } @@ -85,8 +89,9 @@ Rectangle { // Window Behavior on implicitSize { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } diff --git a/.config/quickshell/modules/overview/SearchItem.qml b/.config/quickshell/modules/overview/SearchItem.qml index 2b10c5186..d1f65952d 100644 --- a/.config/quickshell/modules/overview/SearchItem.qml +++ b/.config/quickshell/modules/overview/SearchItem.qml @@ -102,7 +102,7 @@ Button { color: Appearance.m3colors.m3onSurface horizontalAlignment: Text.AlignLeft elide: Text.ElideRight - text: root.itemName + text: `${root.itemName}` } } diff --git a/.config/quickshell/modules/overview/SearchWidget.qml b/.config/quickshell/modules/overview/SearchWidget.qml index 358653b75..9bab9078c 100644 --- a/.config/quickshell/modules/overview/SearchWidget.qml +++ b/.config/quickshell/modules/overview/SearchWidget.qml @@ -217,8 +217,9 @@ Item { // Wrapper Behavior on implicitWidth { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } @@ -318,7 +319,23 @@ Item { // Wrapper }); } } - // Run command + + // Insert math result before command if search starts with a number + const startsWithNumber = /^\d/.test(root.searchingText); + if (startsWithNumber) { + result.push({ + name: root.mathResult, + clickActionName: "Copy", + type: qsTr("Math result"), + fontType: "monospace", + materialSymbol: 'calculate', + execute: () => { + Hyprland.dispatch(`exec wl-copy '${root.mathResult}'`) + } + }); + } + + // Command result.push({ name: searchingText, clickActionName: "Run", @@ -329,17 +346,21 @@ Item { // Wrapper executor.executeCommand(searchingText.startsWith('sudo') ? `${ConfigOptions.apps.terminal} fish -C '${root.searchingText}'` : root.searchingText); } }); - // Qalc math result - result.push({ - name: root.mathResult, - clickActionName: "Copy", - type: qsTr("Math result"), - fontType: "monospace", - materialSymbol: 'calculate', - execute: () => { - Hyprland.dispatch(`exec wl-copy '${root.mathResult}'`) - } - }); + + // If not already added, add math result after command + if (!startsWithNumber) { + result.push({ + name: root.mathResult, + clickActionName: "Copy", + type: qsTr("Math result"), + fontType: "monospace", + materialSymbol: 'calculate', + execute: () => { + Hyprland.dispatch(`exec wl-copy '${root.mathResult}'`) + } + }); + } + // Web search result.push({ name: root.searchingText, diff --git a/.config/quickshell/modules/session/Session.qml b/.config/quickshell/modules/session/Session.qml index 47bed1435..ff08dfdd4 100644 --- a/.config/quickshell/modules/session/Session.qml +++ b/.config/quickshell/modules/session/Session.qml @@ -199,7 +199,7 @@ Scope { Behavior on implicitWidth { SmoothedAnimation { - velocity: Appearance.animation.elementDecelFast.velocity + velocity: Appearance.animation.elementMoveFast.velocity } } diff --git a/.config/quickshell/modules/session/SessionActionButton.qml b/.config/quickshell/modules/session/SessionActionButton.qml index c0ff0a95e..3e0d7ccea 100644 --- a/.config/quickshell/modules/session/SessionActionButton.qml +++ b/.config/quickshell/modules/session/SessionActionButton.qml @@ -38,8 +38,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/sidebarLeft/Anime.qml b/.config/quickshell/modules/sidebarLeft/Anime.qml index e11372600..c43a71a37 100644 --- a/.config/quickshell/modules/sidebarLeft/Anime.qml +++ b/.config/quickshell/modules/sidebarLeft/Anime.qml @@ -38,32 +38,64 @@ Item { Hyprland.dispatch(`exec mkdir -p ${previewDownloadPath}`) } + property var allCommands: [ + { + name: "clear", + description: qsTr("Clear the current list of images"), + execute: () => { + Booru.clearResponses(); + } + }, + { + name: "mode", + description: qsTr("Set the current API provider"), + execute: (args) => { + Booru.setProvider(args[0]); + } + }, + { + name: "nsfw", + description: qsTr("Toggle NSFW mode"), + execute: () => { + ConfigOptions.sidebar.booru.allowNsfw = !ConfigOptions.sidebar.booru.allowNsfw; + } + }, + { + name: "safe", + description: qsTr("Set NSFW mode to false"), + execute: () => { + ConfigOptions.sidebar.booru.allowNsfw = false; + } + }, + { + name: "lewd", + description: qsTr("Set NSFW mode to true"), + execute: () => { + ConfigOptions.sidebar.booru.allowNsfw = true; + } + }, + { + name: "next", + description: qsTr("Get the next page of results"), + execute: () => { + if (Booru.responses.length > 0) { + const lastResponse = Booru.responses[Booru.responses.length - 1]; + root.handleInput(lastResponse.tags.join(" ") + ` ${parseInt(lastResponse.page) + 1}`); + } + } + } + ] + function handleInput(inputText) { if (inputText.startsWith(root.commandPrefix)) { // Handle special commands const command = inputText.split(" ")[0].substring(1); const args = inputText.split(" ").slice(1); - if (command === "clear") { - Booru.clearResponses(); - } - else if (command === "mode") { - const newProvider = args[0]; - Booru.setProvider(newProvider); - } - else if (command == "nsfw") { - ConfigOptions.sidebar.booru.allowNsfw = !ConfigOptions.sidebar.booru.allowNsfw - } - else if (command == "safe") { - ConfigOptions.sidebar.booru.allowNsfw = false - } - else if (command == "lewd") { - ConfigOptions.sidebar.booru.allowNsfw = true - } - else if (command == "next") { - if (Booru.responses.length > 0) { - const lastResponse = Booru.responses[Booru.responses.length - 1] - root.handleInput(lastResponse.tags.join(" ") + ` ${parseInt(lastResponse.page) + 1}`); - } + const commandObj = root.allCommands.find(cmd => cmd.name === `${command}`); + if (commandObj) { + commandObj.execute(args); + } else { + root.addSystemMessage(qsTr("Unknown command: ") + command); } } else if (inputText.trim() == "+") { @@ -132,8 +164,9 @@ Item { Behavior on contentY { NumberAnimation { id: scrollAnim - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.scroll.duration + easing.type: Appearance.animation.scroll.type + easing.bezierCurve: Appearance.animation.scroll.bezierCurve } } @@ -164,8 +197,9 @@ Item { Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -217,8 +251,9 @@ Item { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } @@ -278,8 +313,9 @@ Item { Behavior on implicitHeight { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -324,6 +360,15 @@ Item { root.suggestionList = [] return } + if(tagInputField.text.startsWith(root.commandPrefix)) { + root.suggestionQuery = "" + root.suggestionList = root.allCommands.filter(cmd => cmd.name.startsWith(tagInputField.text.substring(1))).map(cmd => { + return { + name: `${root.commandPrefix}${cmd.name}`, + } + }) + return + } searchTimer.restart(); } @@ -383,8 +428,9 @@ Item { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } @@ -409,13 +455,13 @@ Item { anchors.rightMargin: 5 spacing: 5 - property var commands: [ + property var commandsShown: [ { - name: "/mode", + name: "mode", sendDirectly: false, }, { - name: "/clear", + name: "clear", sendDirectly: true, }, ] @@ -493,10 +539,11 @@ Item { Repeater { // Command buttons id: commandRepeater - model: commandButtonsRow.commands + model: commandButtonsRow.commandsShown delegate: BooruTagButton { id: tagButton - buttonText: modelData.name + property string commandRepresentation: `${root.commandPrefix}${modelData.name}` + buttonText: commandRepresentation background: Rectangle { radius: Appearance.rounding.small color: tagButton.down ? Appearance.colors.colLayer2Active : @@ -505,16 +552,17 @@ Item { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } onClicked: { if(modelData.sendDirectly) { - root.handleInput(modelData.name) + root.handleInput(commandRepresentation) } else { - tagInputField.text = modelData.name + " " + tagInputField.text = commandRepresentation + " " tagInputField.cursorPosition = tagInputField.text.length tagInputField.forceActiveFocus() } diff --git a/.config/quickshell/modules/sidebarLeft/anime/BooruImage.qml b/.config/quickshell/modules/sidebarLeft/anime/BooruImage.qml index d91bb95a9..38a20ed13 100644 --- a/.config/quickshell/modules/sidebarLeft/anime/BooruImage.qml +++ b/.config/quickshell/modules/sidebarLeft/anime/BooruImage.qml @@ -69,6 +69,8 @@ Button { source: modelData.preview_url width: root.rowHeight * modelData.aspect_ratio height: root.rowHeight + visible: opacity > 0 + opacity: status === Image.Ready ? 1 : 0 layer.enabled: true layer.effect: OpacityMask { @@ -78,6 +80,14 @@ Button { radius: Appearance.rounding.small } } + + Behavior on opacity { + NumberAnimation { + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve + } + } } Button { @@ -111,7 +121,8 @@ Button { Rectangle { id: contextMenu - visible: root.showActions + opacity: root.showActions ? 1 : 0 + visible: opacity > 0 radius: Appearance.rounding.small color: Appearance.m3colors.m3surfaceContainer anchors.top: menuButton.bottom @@ -120,6 +131,14 @@ Button { implicitHeight: contextMenuColumnLayout.implicitHeight + radius * 2 implicitWidth: contextMenuColumnLayout.implicitWidth + Behavior on opacity { + NumberAnimation { + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve + } + } + ColumnLayout { id: contextMenuColumnLayout anchors.centerIn: parent @@ -159,5 +178,25 @@ Button { } } + DropShadow { + opacity: root.showActions ? 1 : 0 + visible: opacity > 0 + anchors.fill: contextMenu + source: contextMenu + radius: Appearance.sizes.elevationMargin + samples: radius * 2 + 1 + color: Appearance.colors.colShadow + verticalOffset: 2 + horizontalOffset: 0 + + Behavior on opacity { + NumberAnimation { + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve + } + } + } + } } \ No newline at end of file diff --git a/.config/quickshell/modules/sidebarLeft/anime/BooruResponse.qml b/.config/quickshell/modules/sidebarLeft/anime/BooruResponse.qml index 5156b796e..c43837503 100644 --- a/.config/quickshell/modules/sidebarLeft/anime/BooruResponse.qml +++ b/.config/quickshell/modules/sidebarLeft/anime/BooruResponse.qml @@ -105,14 +105,16 @@ Rectangle { Behavior on height { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } Behavior on implicitHeight { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml b/.config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml index bb8fc9036..1c94bbb50 100644 --- a/.config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml +++ b/.config/quickshell/modules/sidebarRight/BottomWidgetGroup.qml @@ -23,8 +23,9 @@ Rectangle { Behavior on implicitHeight { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -42,7 +43,7 @@ Rectangle { Timer { id: collapseCleanFadeTimer - interval: Appearance.animation.elementDecel.duration / 2 + interval: Appearance.animation.elementMove.duration / 2 repeat: false onTriggered: { if(collapsed) collapsedBottomWidgetGroupRow.opacity = 1 @@ -68,8 +69,9 @@ Rectangle { visible: opacity > 0 Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecel.duration / 2 - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration / 2 + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -107,8 +109,9 @@ Rectangle { visible: opacity > 0 Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecel.duration / 2 - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration / 2 + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -166,7 +169,7 @@ Rectangle { height: tabStack.children[0]?.tabLoader?.implicitHeight // TODO: make this less stupid Layout.alignment: Qt.AlignVCenter property int realIndex: 0 - property int animationDuration: Appearance.animation.elementDecelFast.duration * 1.5 + property int animationDuration: Appearance.animation.elementMoveFast.duration * 1.5 // Switch the tab on halfway of the anim duration Connections { diff --git a/.config/quickshell/modules/sidebarRight/calendar/CalendarDayButton.qml b/.config/quickshell/modules/sidebarRight/calendar/CalendarDayButton.qml index aa523c75b..6977c6bc4 100644 --- a/.config/quickshell/modules/sidebarRight/calendar/CalendarDayButton.qml +++ b/.config/quickshell/modules/sidebarRight/calendar/CalendarDayButton.qml @@ -28,8 +28,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -46,8 +47,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/sidebarRight/calendar/CalendarHeaderButton.qml b/.config/quickshell/modules/sidebarRight/calendar/CalendarHeaderButton.qml index 342652837..b0c394641 100644 --- a/.config/quickshell/modules/sidebarRight/calendar/CalendarHeaderButton.qml +++ b/.config/quickshell/modules/sidebarRight/calendar/CalendarHeaderButton.qml @@ -14,7 +14,7 @@ Button { implicitWidth: forceCircle ? implicitHeight : (contentItem.implicitWidth + 10 * 2) Behavior on implicitWidth { SmoothedAnimation { - velocity: Appearance.animation.elementDecel.velocity + velocity: Appearance.animation.elementMove.velocity } } @@ -27,8 +27,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/sidebarRight/notifications/NotificationList.qml b/.config/quickshell/modules/sidebarRight/notifications/NotificationList.qml index a57c6d7ee..a2f7210df 100644 --- a/.config/quickshell/modules/sidebarRight/notifications/NotificationList.qml +++ b/.config/quickshell/modules/sidebarRight/notifications/NotificationList.qml @@ -143,8 +143,9 @@ Item { visible: opacity > 0 Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } diff --git a/.config/quickshell/modules/sidebarRight/notifications/NotificationStatusButton.qml b/.config/quickshell/modules/sidebarRight/notifications/NotificationStatusButton.qml index 39a1f4fe9..60ea795c8 100644 --- a/.config/quickshell/modules/sidebarRight/notifications/NotificationStatusButton.qml +++ b/.config/quickshell/modules/sidebarRight/notifications/NotificationStatusButton.qml @@ -13,7 +13,7 @@ Button { implicitWidth: contentRowLayout.implicitWidth + 10 * 2 Behavior on implicitWidth { SmoothedAnimation { - velocity: Appearance.animation.elementDecel.velocity + velocity: Appearance.animation.elementMove.velocity } } @@ -26,8 +26,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/sidebarRight/quickToggles/QuickToggleButton.qml b/.config/quickshell/modules/sidebarRight/quickToggles/QuickToggleButton.qml index 07c02f46d..528e5b99f 100644 --- a/.config/quickshell/modules/sidebarRight/quickToggles/QuickToggleButton.qml +++ b/.config/quickshell/modules/sidebarRight/quickToggles/QuickToggleButton.qml @@ -24,8 +24,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } @@ -38,8 +39,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } } diff --git a/.config/quickshell/modules/sidebarRight/todo/TaskList.qml b/.config/quickshell/modules/sidebarRight/todo/TaskList.qml index 7ad34a461..d8b9740c8 100644 --- a/.config/quickshell/modules/sidebarRight/todo/TaskList.qml +++ b/.config/quickshell/modules/sidebarRight/todo/TaskList.qml @@ -53,8 +53,9 @@ Item { Behavior on implicitHeight { enabled: enableHeightAnimation NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } @@ -66,7 +67,7 @@ Item { Timer { id: actionTimer - interval: Appearance.animation.elementDecelFast.duration + interval: Appearance.animation.elementMoveFast.duration repeat: false onTriggered: { if (todoItem.pendingDelete) { @@ -155,8 +156,9 @@ Item { Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/sidebarRight/todo/TodoItemActionButton.qml b/.config/quickshell/modules/sidebarRight/todo/TodoItemActionButton.qml index 43c8626a0..d6ca97855 100644 --- a/.config/quickshell/modules/sidebarRight/todo/TodoItemActionButton.qml +++ b/.config/quickshell/modules/sidebarRight/todo/TodoItemActionButton.qml @@ -16,7 +16,7 @@ Button { Behavior on implicitWidth { SmoothedAnimation { - velocity: Appearance.animation.elementDecel.velocity + velocity: Appearance.animation.elementMove.velocity } } @@ -27,8 +27,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/sidebarRight/todo/TodoWidget.qml b/.config/quickshell/modules/sidebarRight/todo/TodoWidget.qml index ba6dd67f6..a22c977bd 100644 --- a/.config/quickshell/modules/sidebarRight/todo/TodoWidget.qml +++ b/.config/quickshell/modules/sidebarRight/todo/TodoWidget.qml @@ -174,12 +174,11 @@ Item { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } - } - } DropShadow { @@ -195,8 +194,9 @@ Item { Behavior on verticalOffset { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } } @@ -217,8 +217,9 @@ Item { opacity: root.showAddDialog ? 1 : 0 Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } diff --git a/.config/quickshell/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml b/.config/quickshell/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml index cdb89ed27..5ebdc179f 100644 --- a/.config/quickshell/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml +++ b/.config/quickshell/modules/sidebarRight/volumeMixer/AudioDeviceSelectorButton.qml @@ -19,8 +19,9 @@ Button { Behavior on color { ColorAnimation { - duration: Appearance.animation.elementDecel.duration - easing.type: Appearance.animation.elementDecel.type + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } } diff --git a/.config/quickshell/modules/sidebarRight/volumeMixer/VolumeMixer.qml b/.config/quickshell/modules/sidebarRight/volumeMixer/VolumeMixer.qml index 3884e8cfb..c3a6f3382 100644 --- a/.config/quickshell/modules/sidebarRight/volumeMixer/VolumeMixer.qml +++ b/.config/quickshell/modules/sidebarRight/volumeMixer/VolumeMixer.qml @@ -139,8 +139,9 @@ Item { opacity: root.showDeviceSelector ? 1 : 0 Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } @@ -262,20 +263,23 @@ Item { Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on width { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on height { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } @@ -292,20 +296,23 @@ Item { Behavior on opacity { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on width { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } Behavior on height { NumberAnimation { - duration: Appearance.animation.elementDecelFast.duration - easing.type: Appearance.animation.elementDecelFast.type + duration: Appearance.animation.elementMoveFast.duration + easing.type: Appearance.animation.elementMoveFast.type + easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve } } } diff --git a/.config/quickshell/services/AppSearch.qml b/.config/quickshell/services/AppSearch.qml index 9c15a0ad9..41f447d26 100644 --- a/.config/quickshell/services/AppSearch.qml +++ b/.config/quickshell/services/AppSearch.qml @@ -7,9 +7,10 @@ import Quickshell.Io Singleton { id: root - readonly property list list: DesktopEntries.applications.values.filter(a => !a.noDisplay).sort((a, b) => a.name.localeCompare(b.name)) + readonly property list list: Array.from(DesktopEntries.applications.values) + .sort((a, b) => a.name.localeCompare(b.name)) readonly property list preppedNames: list.map(a => ({ - name: Fuzzy.prepare(a.name), + name: Fuzzy.prepare(`${a.name} `), entry: a })) @@ -17,6 +18,8 @@ Singleton { return Fuzzy.go(search, preppedNames, { all: true, key: "name" - }).map(r => r.obj.entry); + }).map(r => { + return r.obj.entry + }); } }