hoverpanel: fix y binding bug — y:-height survives 0→0 animation when layout unfinished at show time

This commit is contained in:
Damocles 2026-04-16 23:44:42 +02:00
parent ceef5c538c
commit 188cecbb42

View file

@ -120,6 +120,10 @@ PanelWindow {
function _show() { function _show() {
_updatePosition(); _updatePosition();
// Explicitly set y before animating avoids the y:-height binding (live, depends on
// _panelColumn.height) surviving a 00 no-op animation when layout isn't done yet.
panelContainer.y = -(panelContainer.height > 0 ? panelContainer.height : 400);
panelContainer.opacity = 0;
_winVisible = true; _winVisible = true;
hideAnim.stop(); hideAnim.stop();
showAnim.start(); showAnim.start();
@ -229,7 +233,7 @@ PanelWindow {
Item { Item {
id: panelContainer id: panelContainer
x: 0 x: 0
y: -height y: 0
width: root.contentWidth width: root.contentWidth
height: _panelColumn.height height: _panelColumn.height
opacity: 0 opacity: 0