2
* Copyright 2016 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import Ubuntu.Components 1.3
22
property var container
23
property var surfaceItem
28
when: !root.surfaceItem.surface
32
when: root.surfaceItem.surface && root.surfaceItem.live
36
when: root.surfaceItem.surface && !root.surfaceItem.live
41
from: "*"; to: "zombie"
42
// Slide downwards until it's out of view, through the bottom of the window
44
// clip so we don't go out of parent's bounds during spread
45
PropertyAction { target: root.container.parent; property: "clip"; value: true }
46
UbuntuNumberAnimation { target: root.surfaceItem; property: "y"; to: root.container.height
47
duration: UbuntuAnimation.BriskDuration }
48
PropertyAction { target: root.surfaceItem; property: "visible"; value: false }
49
PropertyAction { target: container.parent; property: "clip"; value: false }
50
ScriptAction { script: {
51
// Unity.Application can't destroy a zombie MirSurface if it's still being
52
// referenced by a MirSurfaceItem.
53
root.surfaceItem.surface = null;
58
from: "*"; to: "ready"
59
// Slide upwards into view, from the bottom of the window
61
// clip so we don't go out of parent's bounds during spread
62
PropertyAction { target: root.container.parent; property: "clip"; value: true }
63
ScriptAction { script: {
64
root.surfaceItem.y = root.container.height;
65
root.surfaceItem.visible = true;
67
UbuntuNumberAnimation {
68
target: root.surfaceItem; property: "y"; to: 0
69
duration: UbuntuAnimation.BriskDuration
71
PropertyAction { target: container.parent; property: "clip"; value: false }
75
from: "*"; to: "blank"
76
ScriptAction { script: {
77
root.surfaceItem.visible = false;