WIP: Fixes and add cloud page

This commit is contained in:
Lipu Fei 2019-02-28 08:33:28 +01:00
parent 9c66921538
commit 6ebfaff61e
7 changed files with 136 additions and 8 deletions

View file

@ -50,6 +50,11 @@ class WelcomePagesModel(ListModel):
os.path.join("WelcomePages",
"DataCollectionsContent.qml"))),
})
self._pages.append({"id": "cloud",
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
os.path.join("WelcomePages",
"CloudContent.qml"))),
})
self.setItems(self._pages)

View file

@ -0,0 +1,120 @@
// Copyright (c) 2019 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
import QtQuick.Controls 2.3
import UM 1.3 as UM
import Cura 1.1 as Cura
//
// This component contains the content for the "Ultimaker Cloud" page of the welcome on-boarding process.
//
Item
{
UM.I18nCatalog { id: catalog; name: "cura" }
Label
{
id: titleLabel
anchors.top: parent.top
anchors.topMargin: 40
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
text: catalog.i18nc("@label", "Ultimaker Cloud")
color: UM.Theme.getColor("primary_button")
font: UM.Theme.getFont("large_bold")
renderType: Text.NativeRendering
}
Column
{
anchors.top: titleLabel.bottom
anchors.topMargin: 80
anchors.horizontalCenter: parent.horizontalCenter
spacing: 60
Image
{
id: cloudImage
anchors.horizontalCenter: parent.horizontalCenter
source: UM.Theme.getImage("first_run_ultimaker_cloud")
}
Column
{
anchors.horizontalCenter: parent.horizontalCenter
spacing: 30
Label
{
id: highlightTextLabel
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
text: catalog.i18nc("@text", "The next generation 3D printing workflow")
textFormat: Text.RichText
color: UM.Theme.getColor("text_light_blue")
font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
}
Label
{
id: textLabel
anchors.horizontalCenter: parent.horizontalCenter
text: {
var t = "<p>- Send print jobs to Ultimaker printers outside your local network<p>"
t += "<p>- Store your Ultimaker Cura settings in the cloud for use anywhere</p>"
t += "<p>- Get exclusive access to material profiles from leading brands</p>"
catalog.i18nc("@text", t)
}
textFormat: Text.RichText
font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
}
}
}
Cura.PrimaryButton
{
id: finishButton
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins: 40
text: catalog.i18nc("@button", "Finish")
width: 140
fixedWidthMode: true
onClicked: base.showNextPage()
}
Cura.SecondaryButton
{
id: createAccountButton
anchors.left: parent.left
anchors.verticalCenter: finishButton.verticalCenter
anchors.margins: 40
text: catalog.i18nc("@button", "Create an account")
width: 140
fixedWidthMode: true
onClicked: base.showNextPage() // TODO: create account
}
Cura.SecondaryButton
{
id: signInButton
anchors.left: createAccountButton.right
//anchors.leftMargin: 10
anchors.verticalCenter: finishButton.verticalCenter
text: catalog.i18nc("@button", "Sign in")
width: 80
shadowEnabled: false
color: "transparent"
hoverColor: "transparent"
textHoverColor: UM.Theme.getColor("text_light_blue")
fixedWidthMode: true
onClicked: base.showNextPage() // TODO: sign in
}
}

View file

@ -9,7 +9,7 @@ import Cura 1.1 as Cura
//
// This component contains the content for the page "What's new in Ultimaker Cura" of the welcome on-boarding process.
// This component contains the content for the "Help us to improve Ultimaker Cura" page of the welcome on-boarding process.
//
Item
{

View file

@ -7,6 +7,9 @@ import QtQuick.Controls 2.3
import UM 1.3 as UM
import Cura 1.1 as Cura
//
// This component contains the content for the "User Agreement" page of the welcome on-boarding process.
//
Item
{
Column
@ -31,7 +34,7 @@ Item
text: catalog.i18nc("@label", "User Agreement")
color: UM.Theme.getColor("primary_button")
font: UM.Theme.getFont("large_bold")
renderType: NativeRendering
renderType: Text.NativeRendering
}
Label
@ -46,7 +49,7 @@ Item
textFormat: Text.RichText
wrapMode: Text.WordWrap
font: UM.Theme.getFont("default")
renderType: NativeRendering
renderType: Text.NativeRendering
}
}
@ -71,6 +74,6 @@ Item
text: catalog.i18nc("@button", "Decline and close")
width: 140
fixedWidthMode: true
onClicked: base.showNextPage()
onClicked: base.showNextPage() // TODO: quit
}
}

View file

@ -9,7 +9,7 @@ import Cura 1.1 as Cura
//
// This component contains the content for the first page of the welcome on-boarding process.
// This component contains the content for the "Welcome" page of the welcome on-boarding process.
//
Column
{

View file

@ -9,7 +9,7 @@ import Cura 1.1 as Cura
//
// This component contains the content for the page "What's new in Ultimaker Cura" of the welcome on-boarding process.
// This component contains the content for the "What's new in Ultimaker Cura" page of the welcome on-boarding process.
//
Item
{
@ -40,7 +40,6 @@ Item
border.color: "#dfdfdf"
border.width: 1
ScrollView
{
anchors.fill: parent
@ -51,7 +50,6 @@ Item
TextArea
{
id: whatsNewTextArea
width: parent.width
text: catalog.i18nc("@text", "<p><b>Ultimaker Cura 4.0</b></p>
<p>New features</p>

View file

@ -191,6 +191,8 @@
"printer_type_label_background": [228, 228, 242, 255],
"text_light_blue": [50, 130, 255, 255],
"text": [25, 25, 25, 255],
"text_detail": [174, 174, 174, 128],
"text_link": [50, 130, 255, 255],