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
21import Lomiri.SystemSettings.Update 1.0
23import ".." as LocalComponents
26 objectName: "welcomeUpdate"
30 buttonBarVisible: false
33 // XXX: make this distro-agnostic in the future
34 property string distroName: System.distroName
35 property string distroVersion:
36 SystemImage.versionTag || System.version.split("Base-Version: ")[1]
38 Component.onCompleted: {
44 AnchorChanges { target: bgImage; anchors.top: parent.top; anchors.bottom: parent.bottom }
45 AnchorChanges { target: column;
46 anchors.verticalCenter: parent.verticalCenter;
47 anchors.top: undefined
53 PauseAnimation { duration: LomiriAnimation.BriskDuration }
58 duration: LomiriAnimation.BriskDuration
70 source: wideMode ? "data/Desktop_splash_screen_bkg.png" : "data/Phone_splash_screen_bkg.png"
71 scale: Image.PreserveAspectFit
72 anchors.left: parent.left
73 anchors.right: parent.right
74 anchors.bottom: parent.top // outside to let it slide down
80 anchors.leftMargin: leftMargin
81 anchors.rightMargin: rightMargin
82 anchors.left: parent.left
83 anchors.right: parent.right
84 anchors.top: parent.bottom // outside to let it slide in
85 height: childrenRect.height
90 anchors.left: parent.left
91 anchors.right: parent.right
92 horizontalAlignment: Text.AlignHCenter
95 font.weight: Font.Light
97 // TRANSLATORS: %1 contains the distro name, %2 the version
98 text: i18n.tr("Welcome to %1 %2")
99 .arg(distroName).arg(distroVersion)
105 anchors.left: parent.left
106 anchors.right: parent.right
107 anchors.top: welcomeLabel.bottom
108 anchors.topMargin: units.gu(2)
109 horizontalAlignment: Text.AlignHCenter
112 font.weight: Font.Light
114 // TRANSLATORS: %1 contains the distro name, %2 the version
115 text: i18n.tr("We will make sure your device is ready to use %1 %2")
116 .arg(distroName).arg(distroVersion)
122 top: welcomeText.bottom
123 horizontalCenter: parent.horizontalCenter
124 topMargin: units.gu(4)
127 border.width: units.dp(1)
128 border.color: whiteColor
130 width: buttonLabel.paintedWidth + units.gu(6)
131 height: buttonLabel.paintedHeight + units.gu(1.8)
136 text: i18n.tr("Next")
138 anchors.centerIn: parent
141 objectName: "nextButton"
143 onClicked: pageStack.next();