on xenial help sign in
Added application fade in.
4c25006Florian Boucault
qml/Stages/SpreadDelegate.qml+20−7
@@ -16,7 +16,7 @@
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17*/
17*/
18
18
19−import QtQuick 2.0
19+import QtQuick 2.2
20import Unity.Application 0.1
20import Unity.Application 0.1
21import Ubuntu.Components 1.1
21import Ubuntu.Components 1.1
22import "../Components"
22import "../Components"
@@ -58,11 +58,23 @@ Item {
58 SequentialAnimation {
58 SequentialAnimation {
59 id: revealAnimation
59 id: revealAnimation
60
60
61+ PropertyAction {
62+ target: surface
63+ property: "opacity"
64+ value: 0.0
65+ }
61 PropertyAction {
66 PropertyAction {
62 target: surface
67 target: surface
63 property: "visible"
68 property: "visible"
64 value: true
69 value: true
65 }
70 }
71+ OpacityAnimator {
72+ duration: UbuntuAnimation.FastDuration
73+ easing: UbuntuAnimation.StandardEasing
74+ target: surface
75+ from: 0.0
76+ to: 1.0
77+ }
66 PropertyAction {
78 PropertyAction {
67 target: splashLoader
79 target: splashLoader
68 property: "source"
80 property: "source"
@@ -91,7 +103,7 @@ Item {
91
103
92 Timer { //FIXME - need to delay removing splash screen to allow surface resize to complete
104 Timer { //FIXME - need to delay removing splash screen to allow surface resize to complete
93 id: surfaceRevealDelay
105 id: surfaceRevealDelay
94− interval: 100
106+ interval: 300
95 onTriggered: surfaceContainer.revealSurface()
107 onTriggered: surfaceContainer.revealSurface()
96 }
108 }
97
109
@@ -124,6 +136,12 @@ Item {
124 Behavior on opacity { UbuntuNumberAnimation {} }
136 Behavior on opacity { UbuntuNumberAnimation {} }
125 }
137 }
126
138
139+ Loader {
140+ id: splashLoader
141+ anchors.fill: surfaceContainer
142+ anchors.topMargin: maximizedAppTopMargin
143+ }
144+
127 transform: Translate {
145 transform: Translate {
128 y: dragArea.distance
146 y: dragArea.distance
129 }
147 }
@@ -154,11 +172,6 @@ Item {
154 state: "noSurfaceYet"
172 state: "noSurfaceYet"
155 }
173 }
156
174
157− Loader {
158− id: splashLoader
159− anchors.fill: surfaceContainer
160− anchors.topMargin: maximizedAppTopMargin
161− }
162
175
163 DraggingArea {
176 DraggingArea {
164 id: dragArea
177 id: dragArea