forked from Shinonome/dots-hyprland
search: disable expand anim for clipboard showup
This commit is contained in:
@@ -54,6 +54,7 @@ Scope {
|
|||||||
target: GlobalStates
|
target: GlobalStates
|
||||||
function onOverviewOpenChanged() {
|
function onOverviewOpenChanged() {
|
||||||
if (!GlobalStates.overviewOpen) {
|
if (!GlobalStates.overviewOpen) {
|
||||||
|
searchWidget.disableExpandAnimation()
|
||||||
overviewScope.dontAutoCancelSearch = false;
|
overviewScope.dontAutoCancelSearch = false;
|
||||||
} else {
|
} else {
|
||||||
if (!overviewScope.dontAutoCancelSearch) {
|
if (!overviewScope.dontAutoCancelSearch) {
|
||||||
|
|||||||
@@ -29,9 +29,15 @@ Item { // Wrapper
|
|||||||
onShowResultsChanged: {
|
onShowResultsChanged: {
|
||||||
lastQueryWasClipboard = false;
|
lastQueryWasClipboard = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function disableExpandAnimation() {
|
||||||
|
searchWidthBehavior.enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
function cancelSearch() {
|
function cancelSearch() {
|
||||||
searchInput.selectAll()
|
searchInput.selectAll()
|
||||||
root.searchingText = ""
|
root.searchingText = ""
|
||||||
|
searchWidthBehavior.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setSearchingText(text) {
|
function setSearchingText(text) {
|
||||||
@@ -226,10 +232,15 @@ Item { // Wrapper
|
|||||||
implicitWidth: root.searchingText == "" ? Appearance.sizes.searchWidthCollapsed : Appearance.sizes.searchWidth
|
implicitWidth: root.searchingText == "" ? Appearance.sizes.searchWidthCollapsed : Appearance.sizes.searchWidth
|
||||||
|
|
||||||
Behavior on implicitWidth {
|
Behavior on implicitWidth {
|
||||||
|
id: searchWidthBehavior
|
||||||
|
onEnabledChanged: {
|
||||||
|
console.log("Search width behavior enabled:", enabled);
|
||||||
|
}
|
||||||
|
enabled: false
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Appearance.animation.elementMoveFast.duration
|
duration: 300
|
||||||
easing.type: Appearance.animation.elementMoveFast.type
|
easing.type: Appearance.animation.elementMove.type
|
||||||
easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve
|
easing.bezierCurve: Appearance.animation.elementMove.bezierCurve
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user