on xenial help sign in
fixed fade animation without surfaceArea
e1118e4Nick Dedekind
qml/Stages/Animations/DarkenAndFadeInAnimation.qml+9−3
@@ -20,22 +20,28 @@ import Ubuntu.Components 1.1
20BaseSurfaceAnimation {
20BaseSurfaceAnimation {
21 id: animation
21 id: animation
22
22
23+ property Rectangle darkenItem: Rectangle {
24+ parent: animation.surface.parent
25+ anchors.fill: parent
26+ color: Qt.rgba(0,0,0,0.0)
27+ }
28+
23 outChanges: [ PropertyChanges { target: animation.surface; opacity: 0.0 } ]
29 outChanges: [ PropertyChanges { target: animation.surface; opacity: 0.0 } ]
24 outAnimations: [
30 outAnimations: [
25 SequentialAnimation {
31 SequentialAnimation {
26 UbuntuNumberAnimation { target: animation.surface; property: "opacity"; duration: UbuntuAnimation.FastDuration }
32 UbuntuNumberAnimation { target: animation.surface; property: "opacity"; duration: UbuntuAnimation.FastDuration }
27− ColorAnimation { target: animation.parent; duration: UbuntuAnimation.FastDuration }
33+ ColorAnimation { target: darkenItem; duration: UbuntuAnimation.FastDuration }
28 ScriptAction { script: { if (animation.parent.removing) animation.surface.release(); } }
34 ScriptAction { script: { if (animation.parent.removing) animation.surface.release(); } }
29 }
35 }
30 ]
36 ]
31
37
32 inChanges: [
38 inChanges: [
33− PropertyChanges { target: animation.parent; color: Qt.rgba(0,0,0,0.7) },
39+ PropertyChanges { target: darkenItem; color: Qt.rgba(0,0,0,0.7) },
34 PropertyChanges { target: animation.surface; opacity: 1.0 }
40 PropertyChanges { target: animation.surface; opacity: 1.0 }
35 ]
41 ]
36 inAnimations: [
42 inAnimations: [
37 SequentialAnimation {
43 SequentialAnimation {
38− ColorAnimation { target: animation.parent; duration: UbuntuAnimation.FastDuration }
44+ ColorAnimation { target: darkenItem; duration: UbuntuAnimation.FastDuration }
39 UbuntuNumberAnimation { target: animation.surface; property: "opacity"; duration: UbuntuAnimation.FastDuration }
45 UbuntuNumberAnimation { target: animation.surface; property: "opacity"; duration: UbuntuAnimation.FastDuration }
40 }
46 }
41 ]
47 ]