on xenial help sign in
Make the welcome a little nicer
f3f1c26Marius Gripsgard
qml/Wizard/Pages/10-welcome-update.qml+104−15
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2015-2016 Canonical, Ltd.
2+ * Copyright (C) 2013-2016 Canonical, Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -16,30 +16,119 @@
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
19−import AccountsService 0.1
20import Wizard 0.1
19import Wizard 0.1
21import ".." as LocalComponents
20import ".." as LocalComponents
22
21
23LocalComponents.Page {
22LocalComponents.Page {
24 objectName: "welcomeUpdate"
23 objectName: "welcomeUpdate"
25− title: i18n.tr("Welcome to " + System.version)
26
24
27− forwardButtonSourceComponent: forwardButton
25+ hasBackButton: false
26+ customTitle: true
27+ buttonBarVisible: false
28 onlyOnUpdate: true
28 onlyOnUpdate: true
29
29
30− Label {
30+ Component.onCompleted: {
31− text: "This is where cool stuff would go"
31+ state = "reanchored";
32 }
32 }
33
33
34− Component {
34+ states: State {
35− id: forwardButton
35+ name: "reanchored"
36− LocalComponents.StackButton {
36+ AnchorChanges { target: bgImage; anchors.top: parent.top; anchors.bottom: parent.bottom }
37+ AnchorChanges { target: column;
38+ anchors.verticalCenter: parent.verticalCenter;
39+ anchors.top: undefined
40+ }
41+ }
42+
43+ SequentialAnimation {
44+ id: splashAnimation
45+ PauseAnimation { duration: UbuntuAnimation.BriskDuration }
46+ SmoothedAnimation {
47+ target: bgImage
48+ property: "height"
49+ to: units.gu(16)
50+ duration: UbuntuAnimation.BriskDuration
51+ }
52+ NumberAnimation {
53+ target: bgImage
54+ property: 'opacity'
55+ from: 1
56+ to: 0
57+ }
58+ }
59+
60+ Image {
61+ id: bgImage
62+ source: wideMode ? "data/Desktop_splash_screen_bkg.png" : "data/Phone_splash_screen_bkg.png"
63+ scale: Image.PreserveAspectFit
64+ anchors.left: parent.left
65+ anchors.right: parent.right
66+ anchors.bottom: parent.top // outside to let it slide down
67+ visible: opacity > 0
68+ }
69+
70+ Item {
71+ id: column
72+ anchors.leftMargin: leftMargin
73+ anchors.rightMargin: rightMargin
74+ anchors.left: parent.left
75+ anchors.right: parent.right
76+ anchors.top: parent.bottom // outside to let it slide in
77+ height: childrenRect.height
78+ visible: opacity > 0
79+
80+ Label {
81+ id: welcomeLabel
82+ anchors.left: parent.left
83+ anchors.right: parent.right
84+ horizontalAlignment: Text.AlignHCenter
85+ wrapMode: Text.Wrap
86+ fontSize: "x-large"
87+ font.weight: Font.Light
88+ lineHeight: 1.2
89+ text: i18n.tr("Welcome to ") + System.version.split("Base-Version: ")[1]
90+ color: whiteColor
91+ }
92+
93+ Label {
94+ id: welcomeText
95+ anchors.left: parent.left
96+ anchors.right: parent.right
97+ anchors.top: welcomeLabel.bottom
98+ anchors.topMargin: units.gu(2)
99+ horizontalAlignment: Text.AlignHCenter
100+ wrapMode: Text.Wrap
101+ fontSize: "large"
102+ font.weight: Font.Light
103+ lineHeight: 1.2
104+ text: i18n.tr("We will make sure your device is ready to use ") + System.version.split("Base-Version: ")[1]
105+ color: whiteColor
106+ }
107+
108+ Rectangle {
109+ anchors {
110+ top: welcomeText.bottom
111+ horizontalCenter: parent.horizontalCenter
112+ topMargin: units.gu(4)
113+ }
114+ color: "transparent"
115+ border.width: units.dp(1)
116+ border.color: whiteColor
117+ radius: units.dp(4)
118+ width: buttonLabel.paintedWidth + units.gu(6)
119+ height: buttonLabel.paintedHeight + units.gu(1.8)
120+
121+ Label {
122+ id: buttonLabel
123+ color: whiteColor
37− text: i18n.tr("Next")
124+ text: i18n.tr("Next")
38− onClicked: {
125+ fontSize: "medium"
39− if (d.validName) {
126+ anchors.centerIn: parent
40− AccountsService.realName = d.validName;
127+ }
41− }
128+ AbstractButton {
129+ objectName: "nextButton"
130+ anchors.fill: parent
42− pageStack.next();
131+ onClicked: pageStack.next();
43 }
132 }
44 }
133 }
45 }
134 }
qml/Wizard/Pages/11-changelog.qml+15−2
@@ -26,8 +26,21 @@ LocalComponents.Page {
26 forwardButtonSourceComponent: forwardButton
26 forwardButtonSourceComponent: forwardButton
27 onlyOnUpdate: true
27 onlyOnUpdate: true
28
28
29+
30+ Column {
31+ id: column
32+ spacing: units.gu(2)
33+
34+ anchors {
35+ fill: content
36+ leftMargin: wideMode ? parent.leftMargin : staticMargin
37+ rightMargin: wideMode ? parent.rightMargin : staticMargin
38+ topMargin: staticMargin
39+ }
40+
29− Label {
41+ Label {
30− text: "This is where cool stuff would go"
42+ text: "This is where cool stuff would go"
43+ }
31 }
44 }
32
45
33 Component {
46 Component {
qml/Wizard/Pages/80-finished.qml+3−3
@@ -16,6 +16,7 @@
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
19+import Wizard 0.1
19import ".." as LocalComponents
20import ".." as LocalComponents
20
21
21LocalComponents.Page {
22LocalComponents.Page {
@@ -25,7 +26,6 @@ LocalComponents.Page {
25 customTitle: true
26 customTitle: true
26 lastPage: true
27 lastPage: true
27 buttonBarVisible: false
28 buttonBarVisible: false
28− onlyOnInstall: true
29
29
30 Component.onCompleted: {
30 Component.onCompleted: {
31 state = "reanchored";
31 state = "reanchored";
@@ -87,7 +87,7 @@ LocalComponents.Page {
87 fontSize: "x-large"
87 fontSize: "x-large"
88 font.weight: Font.Light
88 font.weight: Font.Light
89 lineHeight: 1.2
89 lineHeight: 1.2
90− text: (wizard.runningWizardVersion === 0) ? i18n.tr("Welcome to Ubuntu") : i18n.tr("Welcome Back")
90+ text: (System.isUpdate) ? i18n.tr("Welcome Back") : i18n.tr("Welcome to Ubuntu")
91 color: whiteColor
91 color: whiteColor
92 }
92 }
93
93
@@ -122,7 +122,7 @@ LocalComponents.Page {
122 Label {
122 Label {
123 id: buttonLabel
123 id: buttonLabel
124 color: whiteColor
124 color: whiteColor
125− text: (wizard.runningWizardVersion === 0) ? i18n.tr("Get Started") : i18n.tr("Continue")
125+ text: (System.isUpdate) ? i18n.tr("Continue") : i18n.tr("Get Started")
126 fontSize: "medium"
126 fontSize: "medium"
127 anchors.centerIn: parent
127 anchors.centerIn: parent
128 }
128 }