fix hover panel hide race with 50ms debounce

This commit is contained in:
Damocles 2026-04-13 21:59:59 +02:00
parent cce695a8c6
commit 55627bc157

View file

@ -50,15 +50,26 @@ PanelWindow {
margins.left = Math.max(0, Math.min(Math.round(pt.x - (scr?.x ?? 0) - contentWidth / 2), sw - contentWidth));
}
Timer {
id: _hideTimer
interval: 50
onTriggered: {
if (!root.showPanel) {
showAnim.stop();
hideAnim.start();
}
}
}
onShowPanelChanged: {
if (showPanel) {
_hideTimer.stop();
_updatePosition();
_winVisible = true;
hideAnim.stop();
showAnim.start();
} else {
showAnim.stop();
hideAnim.start();
_hideTimer.restart();
}
}