From 80203c17c1c6c635e807aee2e07c5b0421c68cd1 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 27 May 2025 00:00:00 +0200 Subject: [PATCH] search: disable expand anim for clipboard showup --- .../quickshell/modules/overview/Overview.qml | 1 + .../modules/overview/SearchWidget.qml | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/modules/overview/Overview.qml b/.config/quickshell/modules/overview/Overview.qml index aa09930b9..7d671b779 100644 --- a/.config/quickshell/modules/overview/Overview.qml +++ b/.config/quickshell/modules/overview/Overview.qml @@ -54,6 +54,7 @@ Scope { target: GlobalStates function onOverviewOpenChanged() { if (!GlobalStates.overviewOpen) { + searchWidget.disableExpandAnimation() overviewScope.dontAutoCancelSearch = false; } else { if (!overviewScope.dontAutoCancelSearch) { diff --git a/.config/quickshell/modules/overview/SearchWidget.qml b/.config/quickshell/modules/overview/SearchWidget.qml index 419c0671d..d649a42b5 100644 --- a/.config/quickshell/modules/overview/SearchWidget.qml +++ b/.config/quickshell/modules/overview/SearchWidget.qml @@ -29,9 +29,15 @@ Item { // Wrapper onShowResultsChanged: { lastQueryWasClipboard = false; } + + function disableExpandAnimation() { + searchWidthBehavior.enabled = false; + } + function cancelSearch() { searchInput.selectAll() root.searchingText = "" + searchWidthBehavior.enabled = true; } function setSearchingText(text) { @@ -226,10 +232,15 @@ Item { // Wrapper implicitWidth: root.searchingText == "" ? Appearance.sizes.searchWidthCollapsed : Appearance.sizes.searchWidth Behavior on implicitWidth { + id: searchWidthBehavior + onEnabledChanged: { + console.log("Search width behavior enabled:", enabled); + } + enabled: false NumberAnimation { - duration: Appearance.animation.elementMoveFast.duration - easing.type: Appearance.animation.elementMoveFast.type - easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve + duration: 300 + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve } }