mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -04:00
launcher/spotlight: improve height-change animation
port 1.5
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user