hoverpanel: fix y binding bug — y:-height survives 0→0 animation when layout unfinished at show time
This commit is contained in:
parent
ceef5c538c
commit
188cecbb42
1 changed files with 5 additions and 1 deletions
|
|
@ -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 0→0 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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue