on xenial help sign in
fixed fade animation without surfaceArea
commite1118e4f790630388fee1f8dc1c2c5decfb1cabf authorNick Dedekind <nicholas.dedekind@gmail.com> dateWed 23 Jul 2014, 13:34 (12 years ago) parent49f5735
1 file changed+9−3
qml/Stages/Animations/DarkenAndFadeInAnimation.qml+9−3
qml/Stages/Animations/DarkenAndFadeInAnimation.qml+9−3
@@ -20,22 +20,28 @@ import Ubuntu.Components 1.1
2020BaseSurfaceAnimation {
2121 id: animation
2222
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+
2329 outChanges: [ PropertyChanges { target: animation.surface; opacity: 0.0 } ]
2430 outAnimations: [
2531 SequentialAnimation {
2632 UbuntuNumberAnimation { target: animation.surface; property: "opacity"; duration: UbuntuAnimation.FastDuration }
27− ColorAnimation { target: animation.parent; duration: UbuntuAnimation.FastDuration }
33+ ColorAnimation { target: darkenItem; duration: UbuntuAnimation.FastDuration }
2834 ScriptAction { script: { if (animation.parent.removing) animation.surface.release(); } }
2935 }
3036 ]
3137
3238 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) },
3440 PropertyChanges { target: animation.surface; opacity: 1.0 }
3541 ]
3642 inAnimations: [
3743 SequentialAnimation {
38− ColorAnimation { target: animation.parent; duration: UbuntuAnimation.FastDuration }
44+ ColorAnimation { target: darkenItem; duration: UbuntuAnimation.FastDuration }
3945 UbuntuNumberAnimation { target: animation.surface; property: "opacity"; duration: UbuntuAnimation.FastDuration }
4046 }
4147 ]