search: disable expand anim for clipboard showup

This commit is contained in:
end-4
2025-05-27 00:00:00 +02:00
parent 536fb27941
commit 80203c17c1
2 changed files with 15 additions and 3 deletions
@@ -54,6 +54,7 @@ Scope {
target: GlobalStates
function onOverviewOpenChanged() {
if (!GlobalStates.overviewOpen) {
searchWidget.disableExpandAnimation()
overviewScope.dontAutoCancelSearch = false;
} else {
if (!overviewScope.dontAutoCancelSearch) {
@@ -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
}
}