2 * Copyright (C) 2018 The UBports project
4 * Written by: Marius Gripsgard <marius@ubports.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 3.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20import Lomiri.Components 1.3
22import ".." as LocalComponents
25 objectName: "welcomeUpdate"
29 buttonBarVisible: false
32 Component.onCompleted: {
38 AnchorChanges { target: bgImage; anchors.top: parent.top; anchors.bottom: parent.bottom }
39 AnchorChanges { target: column;
40 anchors.verticalCenter: parent.verticalCenter;
41 anchors.top: undefined
47 PauseAnimation { duration: LomiriAnimation.BriskDuration }
52 duration: LomiriAnimation.BriskDuration
64 source: wideMode ? "data/Desktop_splash_screen_bkg.png" : "data/Phone_splash_screen_bkg.png"
65 scale: Image.PreserveAspectFit
66 anchors.left: parent.left
67 anchors.right: parent.right
68 anchors.bottom: parent.top // outside to let it slide down
74 anchors.leftMargin: leftMargin
75 anchors.rightMargin: rightMargin
76 anchors.left: parent.left
77 anchors.right: parent.right
78 anchors.top: parent.bottom // outside to let it slide in
79 height: childrenRect.height
84 anchors.left: parent.left
85 anchors.right: parent.right
86 horizontalAlignment: Text.AlignHCenter
89 font.weight: Font.Light
91 // TRANSLATORS: %1 contains the distro name, %2 the version
92 text: i18n.tr("Welcome to %1 %2").arg(System.distroName).arg(System.version.split("Base-Version: ")[1])
98 anchors.left: parent.left
99 anchors.right: parent.right
100 anchors.top: welcomeLabel.bottom
101 anchors.topMargin: units.gu(2)
102 horizontalAlignment: Text.AlignHCenter
105 font.weight: Font.Light
107 // TRANSLATORS: %1 contains the distro name, %2 the version
108 text: i18n.tr("We will make sure your device is ready to use %1 %2").arg(System.distroName).arg(System.version.split("Base-Version: ")[1])
114 top: welcomeText.bottom
115 horizontalCenter: parent.horizontalCenter
116 topMargin: units.gu(4)
119 border.width: units.dp(1)
120 border.color: whiteColor
122 width: buttonLabel.paintedWidth + units.gu(6)
123 height: buttonLabel.paintedHeight + units.gu(1.8)
128 text: i18n.tr("Next")
130 anchors.centerIn: parent
133 objectName: "nextButton"
135 onClicked: pageStack.next();