on xenial help sign in
tweaked animations
d3821d4Nick Dedekind
qml/Stages/SessionContainer.qml+10−8
@@ -75,23 +75,20 @@ Item {
75 Connections {
75 Connections {
76 target: modelData
76 target: modelData
77 onSurfaceChanged: {
77 onSurfaceChanged: {
78+ if (modelData.surface) {
78− if (surface) item.animateIn(swipeFromBottom);
79+ item.animateIn();
80+ }
79 }
81 }
80 onRemoved: {
82 onRemoved: {
81 item.removing = true;
83 item.removing = true;
82 item.animateOut();
84 item.animateOut();
83 }
85 }
84 }
86 }
85−
86− Component {
87− id: swipeFromBottom
88− SwipeFromBottomAnimation {}
89− }
90 }
87 }
91 }
88 }
92
89
93− function animateIn(animationComponent) {
90+ function animateIn() {
94− var animation = animationComponent.createObject(root,
91+ var animation = swipeFromBottom.createObject(root,
95 {
92 {
96 "sessionContainer": root,
93 "sessionContainer": root,
97 "surfaceContainer": surfaceContainer
94 "surfaceContainer": surfaceContainer
@@ -112,6 +109,11 @@ Item {
112 }
109 }
113 }
110 }
114
111
112+ Component {
113+ id: swipeFromBottom
114+ SwipeFromBottomAnimation {}
115+ }
116+
115 QtObject {
117 QtObject {
116 id: d
118 id: d
117 property var animations: []
119 property var animations: []