diff --git a/modules/HoverPanel.qml b/modules/HoverPanel.qml index 7ffd20f..5072c92 100644 --- a/modules/HoverPanel.qml +++ b/modules/HoverPanel.qml @@ -120,10 +120,16 @@ PanelWindow { function _show() { _updatePosition(); - // Explicitly set y before animating — avoids the y:-height binding (live, depends on - // _panelColumn.height) surviving a 0→0 no-op animation when layout isn't done yet. - panelContainer.y = -(panelContainer.height > 0 ? panelContainer.height : 400); - panelContainer.opacity = 0; + // Only snap to closed position when genuinely opening from scratch. + // If we are interrupting a hide animation, animate back from the current + // y/opacity so there's no visible jump — the showAnim NumberAnimations + // always run from the *current* value to their target. + if (!hideAnim.running) { + // Explicitly set y before animating — avoids the y:-height binding (live, depends on + // _panelColumn.height) surviving a 0→0 no-op animation when layout isn't done yet. + panelContainer.y = -(panelContainer.height > 0 ? panelContainer.height : 400); + panelContainer.opacity = 0; + } _winVisible = true; hideAnim.stop(); showAnim.start();