1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 03:28:28 -04:00

launcher/spotlight: improve height-change animation

port 1.5

(cherry picked from commit 7b5c25c50f)
This commit is contained in:
bbedward
2026-07-13 16:38:40 -04:00
committed by dms-ci[bot]
parent 417da7408d
commit 781ed16538
@@ -42,7 +42,17 @@ FocusScope {
return Theme.surfaceContainer;
}
implicitHeight: _searchAreaH + _resultsH
implicitHeight: _searchAreaH + resultsContainer.height
property bool _animateResize: false
Component.onCompleted: resizeAnimEnableTimer.restart()
Timer {
id: resizeAnimEnableTimer
interval: 100
onTriggered: root._animateResize = true
}
function resetScroll() {
resultsList.resetScroll();
@@ -239,8 +249,12 @@ FocusScope {
}
function onContentVisibleChanged() {
if (!root.parentModal?.contentVisible)
if (!root.parentModal?.contentVisible) {
root.closeTransientUi();
return;
}
root._animateResize = false;
resizeAnimEnableTimer.restart();
}
}
@@ -420,6 +434,7 @@ FocusScope {
height: root._resultsH
Behavior on height {
enabled: root._animateResize
NumberAnimation {
duration: root._resizeDuration
easing.type: Easing.BezierSpline