on xenial help sign in
final page animation
8c9807fLukáš Tinkl
qml/Wizard/Pages/80-finished.qml+39−4
@@ -25,20 +25,55 @@ LocalComponents.Page {
25 customTitle: true
25 customTitle: true
26 lastPage: true
26 lastPage: true
27
27
28+ Component.onCompleted: {
29+ state = "reanchored";
30+ }
31+
32+ states: State {
33+ name: "reanchored"
34+ AnchorChanges { target: bgImage; anchors.top: parent.top; anchors.bottom: parent.bottom }
35+ AnchorChanges { target: column;
36+ anchors.verticalCenter: parent.verticalCenter;
37+ anchors.top: undefined
38+ }
39+ }
40+
41+ transitions: Transition {
42+ ParallelAnimation {
43+ AnchorAnimation {
44+ targets: [bgImage, column]
45+ duration: UbuntuAnimation.BriskDuration
46+ easing.type: Easing.OutCubic
47+ }
48+ NumberAnimation { // opacity animation
49+ targets: [bgImage,column]
50+ property: 'opacity'
51+ from: 0
52+ to: 1
53+ duration: UbuntuAnimation.BriskDuration
54+ }
55+ }
56+ }
57+
28 Image {
58 Image {
59+ id: bgImage
29 source: "data/Phone Splash Screen bkg.png"
60 source: "data/Phone Splash Screen bkg.png"
30− anchors.fill: parent
31 scale: Image.PreserveAspectFit
61 scale: Image.PreserveAspectFit
62+ anchors.left: parent.left
63+ anchors.right: parent.right
64+ anchors.bottom: parent.top // outside to let it slide down
65+ visible: opacity > 0
32 }
66 }
33
67
34 Column {
68 Column {
35 id: column
69 id: column
36− anchors.left: parent.left
37− anchors.right: parent.right
38− anchors.verticalCenter: parent.verticalCenter
39 anchors.leftMargin: leftMargin
70 anchors.leftMargin: leftMargin
40 anchors.rightMargin: rightMargin
71 anchors.rightMargin: rightMargin
72+ anchors.left: parent.left
73+ anchors.right: parent.right
74+ anchors.top: parent.bottom // outside to let it slide in
41 spacing: units.gu(2)
75 spacing: units.gu(2)
76+ visible: opacity > 0
42
77
43 Label {
78 Label {
44 id: welcomeLabel
79 id: welcomeLabel