Arrange CloudContent.qml differently

This commit is contained in:
Lipu Fei 2019-03-22 11:15:43 +01:00
parent 1e3945810f
commit 090e176969

View file

@ -28,28 +28,34 @@ Item
renderType: Text.NativeRendering renderType: Text.NativeRendering
} }
// Area where the cloud contents can be put. Pictures, texts and such.
Item
{
id: cloudContentsArea
anchors.top: titleLabel.bottom
anchors.bottom: finishButton.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: UM.Theme.getSize("default_margin").width
// Pictures and texts are arranged using Columns with spacing. The whole picture and text area is centered in
// the cloud contents area.
Column Column
{ {
anchors.top: titleLabel.bottom anchors.centerIn: parent
anchors.topMargin: 80 width: childrenRect.width
anchors.horizontalCenter: parent.horizontalCenter height: childrenRect.height
spacing: 60 spacing: 20 * screenScaleFactor
Image Image // Cloud image
{ {
id: cloudImage id: cloudImage
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
source: UM.Theme.getImage("first_run_ultimaker_cloud") source: UM.Theme.getImage("first_run_ultimaker_cloud")
} }
Column Label // A title-ish text
{
anchors.horizontalCenter: parent.horizontalCenter
spacing: 30
Label
{ {
id: highlightTextLabel id: highlightTextLabel
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
@ -61,15 +67,26 @@ Item
renderType: Text.NativeRendering renderType: Text.NativeRendering
} }
Label Label // A number of text items
{ {
id: textLabel id: textLabel
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: { 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>" // There are 3 text items, each of which is translated separately as a single piece of text.
t += "<p>- Get exclusive access to material profiles from leading brands</p>" var full_text = ""
catalog.i18nc("@text", t) var t = ""
t = catalog.i18nc("@text", "- Send print jobs to Ultimaker printers outside your local network")
full_text += "<p>" + t + "</p>"
t = catalog.i18nc("@text", "- Store your Ultimaker Cura settings in the cloud for use anywhere")
full_text += "<p>" + t + "</p>"
t = catalog.i18nc("@text", "- Get exclusive access to material profiles from leading brands")
full_text += "<p>" + t + "</p>"
return full_text
} }
textFormat: Text.RichText textFormat: Text.RichText
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
@ -78,6 +95,7 @@ Item
} }
} }
// Bottom buttons go here
Cura.PrimaryButton Cura.PrimaryButton
{ {
id: finishButton id: finishButton