diff options
Diffstat (limited to 'examples/wayland/pure-qml/qml/Chrome.qml')
-rw-r--r-- | examples/wayland/pure-qml/qml/Chrome.qml | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/examples/wayland/pure-qml/qml/Chrome.qml b/examples/wayland/pure-qml/qml/Chrome.qml index d9ff038c0..201fa5241 100644 --- a/examples/wayland/pure-qml/qml/Chrome.qml +++ b/examples/wayland/pure-qml/qml/Chrome.qml @@ -58,11 +58,25 @@ ShellSurfaceItem { signal destroyAnimationFinished + // ![destruction] onSurfaceDestroyed: { bufferLocked = true; destroyAnimation.start(); } + SequentialAnimation { + id: destroyAnimation + + ParallelAnimation { + NumberAnimation { target: scaleTransform; property: "yScale"; to: 2/height; duration: 150 } + NumberAnimation { target: scaleTransform; property: "xScale"; to: 0.4; duration: 150 } + NumberAnimation { target: chrome; property: "opacity"; to: chrome.isChild ? 0 : 1; duration: 150 } + } + NumberAnimation { target: scaleTransform; property: "xScale"; to: 0; duration: 150 } + ScriptAction { script: destroyAnimationFinished() } + } + // ![destruction] + transform: [ Scale { id: scaleTransform @@ -71,6 +85,7 @@ ShellSurfaceItem { } ] + // ![activation] Connections { target: shellSurface.toplevel !== undefined ? shellSurface.toplevel : null @@ -85,18 +100,6 @@ ShellSurfaceItem { } SequentialAnimation { - id: destroyAnimation - - ParallelAnimation { - NumberAnimation { target: scaleTransform; property: "yScale"; to: 2/height; duration: 150 } - NumberAnimation { target: scaleTransform; property: "xScale"; to: 0.4; duration: 150 } - NumberAnimation { target: chrome; property: "opacity"; to: chrome.isChild ? 0 : 1; duration: 150 } - } - NumberAnimation { target: scaleTransform; property: "xScale"; to: 0; duration: 150 } - ScriptAction { script: destroyAnimationFinished() } - } - - SequentialAnimation { id: receivedFocusAnimation ParallelAnimation { @@ -108,4 +111,5 @@ ShellSurfaceItem { NumberAnimation { target: scaleTransform; property: "xScale"; to: 1; duration: 100; easing.type: Easing.InOutQuad } } } + // ![activation] } |