on xenial help sign in
better animation
552be80Nick Dedekind
qml/Stages/Animations/BaseSessionAnimation.qml+2−3
@@ -37,8 +37,7 @@ import QtQuick 2.0
37 */
37 */
38Item {
38Item {
39 id: base
39 id: base
40− property var sessionContainer
40+ property var container
41− property var surfaceContainer
42
41
43
42
44 // changes applied when state changes to "in"
43 // changes applied when state changes to "in"
@@ -63,7 +62,7 @@ Item {
63 states: [
62 states: [
64 State {
63 State {
65 name: "baseAnimation"
64 name: "baseAnimation"
66− PropertyChanges { target: surfaceContainer; anchors.fill: undefined }
65+ PropertyChanges { target: container; anchors.fill: undefined }
67 },
66 },
68
67
69 State {
68 State {
qml/Stages/Animations/SwipeFromBottomAnimation.qml+12−12
@@ -21,32 +21,32 @@ BaseSessionAnimation {
21 id: animation
21 id: animation
22
22
23 outChanges: [ AnchorChanges {
23 outChanges: [ AnchorChanges {
24− target: surfaceContainer;
24+ target: container;
25− anchors.top: sessionContainer.bottom
25+ anchors.top: container.parent.bottom
26− anchors.right: sessionContainer.right
26+ anchors.right: container.parent.right
27− anchors.left: sessionContainer.left
27+ anchors.left: container.parent.left
28 }
28 }
29 ]
29 ]
30 outAnimations: [
30 outAnimations: [
31 SequentialAnimation {
31 SequentialAnimation {
32− PropertyAction { target: sessionContainer; property: "clip"; value: true }
32+ PropertyAction { target: container.parent; property: "clip"; value: true }
33 AnchorAnimation { easing: UbuntuAnimation.StandardEasing; duration: UbuntuAnimation.BriskDuration }
33 AnchorAnimation { easing: UbuntuAnimation.StandardEasing; duration: UbuntuAnimation.BriskDuration }
34− PropertyAction { target: sessionContainer; property: "clip"; value: false }
34+ PropertyAction { target: container.parent; property: "clip"; value: false }
35− ScriptAction { script: { sessionContainer.session.release(); } }
35+ ScriptAction { script: { container.session.release(); } }
36 }
36 }
37 ]
37 ]
38
38
39 inChanges: [
39 inChanges: [
40 AnchorChanges {
40 AnchorChanges {
41− target: surfaceContainer;
41+ target: container;
42− anchors.top: sessionContainer.top
42+ anchors.top: container.parent.top
43− anchors.bottom: sessionContainer.bottom
43+ anchors.bottom: container.parent.bottom
44 } ]
44 } ]
45 inAnimations: [
45 inAnimations: [
46 SequentialAnimation {
46 SequentialAnimation {
47− PropertyAction { target: sessionContainer; property: "clip"; value: true }
47+ PropertyAction { target: container.parent; property: "clip"; value: true }
48 AnchorAnimation { easing: UbuntuAnimation.StandardEasing; duration: UbuntuAnimation.BriskDuration }
48 AnchorAnimation { easing: UbuntuAnimation.StandardEasing; duration: UbuntuAnimation.BriskDuration }
49− PropertyAction { target: sessionContainer; property: "clip"; value: false }
49+ PropertyAction { target: container.parent; property: "clip"; value: false }
50 }
50 }
51 ]
51 ]
52}
52}
qml/Stages/SessionContainer.qml+2−6
@@ -21,7 +21,7 @@ Item {
21 id: root
21 id: root
22 objectName: "sessionContainer"
22 objectName: "sessionContainer"
23 property QtObject session
23 property QtObject session
24− property var childSessions: session ? session.childSessions : 0
24+ property var childSessions: session ? session.childSessions : null
25 property alias surface: _surfaceContainer.surface
25 property alias surface: _surfaceContainer.surface
26 property bool interactive: true
26 property bool interactive: true
27
27
@@ -82,11 +82,7 @@ Item {
82 }
82 }
83
83
84 function animateIn() {
84 function animateIn() {
85− var animation = swipeFromBottom.createObject(root,
85+ var animation = swipeFromBottom.createObject(root, { "container": root, });
86− {
87− "sessionContainer": root,
88− "surfaceContainer": surfaceContainer
89− });
90 animation.start();
86 animation.start();
91
87
92 var tmp = d.animations;
88 var tmp = d.animations;