From 7c3c32ecc62dfdb701daafc3f800767ff1eb9040 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 14 Nov 2016 11:59:16 +0100 Subject: Fade-out animation for menus Since child items don't get transformation animations, enable an opacity transformation for them. Change-Id: I4ab77bc10d61602a0df72f5927cde4ebbcad27ce Reviewed-by: Johan Helsing --- examples/wayland/pure-qml/qml/Chrome.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/wayland/pure-qml/qml/Chrome.qml b/examples/wayland/pure-qml/qml/Chrome.qml index d2ff5cc2a..dc3ad4731 100644 --- a/examples/wayland/pure-qml/qml/Chrome.qml +++ b/examples/wayland/pure-qml/qml/Chrome.qml @@ -44,6 +44,8 @@ import QtWayland.Compositor 1.0 ShellSurfaceItem { id: rootChrome + property bool isChild: parent.shellSurface !== undefined + onSurfaceDestroyed: { bufferLocked = true; destroyAnimation.start(); @@ -67,6 +69,7 @@ ShellSurfaceItem { ParallelAnimation { NumberAnimation { target: scaleTransform; property: "yScale"; to: 2/height; duration: 150 } NumberAnimation { target: scaleTransform; property: "xScale"; to: 0.4; duration: 150 } + NumberAnimation { target: rootChrome; property: "opacity"; to: rootChrome.isChild ? 0 : 1; duration: 150 } } NumberAnimation { target: scaleTransform; property: "xScale"; to: 0; duration: 150 } ScriptAction { script: { rootChrome.destroy(); } } -- cgit v1.2.3