mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Cleaned up the QML
This moves all the "default" margins of the welcome pages into a single point (the WizardPanel) in order to prevent having to re-define it every time. I've also fixed some incorrect margins that we had CURA-6057
This commit is contained in:
parent
1d6d3d729d
commit
74903fe3e5
8 changed files with 46 additions and 57 deletions
|
@ -19,7 +19,6 @@ Item
|
|||
{
|
||||
id: titleLabel
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.getSize("wide_margin").height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@label", "Add a printer")
|
||||
|
@ -110,7 +109,6 @@ Item
|
|||
id: nextButton
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
enabled:
|
||||
{
|
||||
// If the network printer dropdown is expanded, make sure that there is a selected item
|
||||
|
|
|
@ -31,7 +31,6 @@ Item
|
|||
{
|
||||
id: titleLabel
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.getSize("wide_margin").height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@label", "Ultimaker Cloud")
|
||||
|
@ -44,11 +43,15 @@ Item
|
|||
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
|
||||
anchors
|
||||
{
|
||||
top: titleLabel.bottom
|
||||
bottom: finishButton.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
topMargin: UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
|
||||
|
||||
// Pictures and texts are arranged using Columns with spacing. The whole picture and text area is centered in
|
||||
// the cloud contents area.
|
||||
|
@ -113,7 +116,6 @@ Item
|
|||
id: finishButton
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
text: catalog.i18nc("@button", "Finish")
|
||||
onClicked: base.showNextPage()
|
||||
}
|
||||
|
@ -123,7 +125,6 @@ Item
|
|||
id: createAccountButton
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: finishButton.verticalCenter
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
text: catalog.i18nc("@button", "Create an account")
|
||||
onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create")
|
||||
}
|
||||
|
@ -133,7 +134,7 @@ Item
|
|||
id: signInButton
|
||||
anchors.left: createAccountButton.right
|
||||
anchors.verticalCenter: finishButton.verticalCenter
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@button", "Sign in")
|
||||
color: UM.Theme.getColor("secondary_button_text")
|
||||
font: UM.Theme.getFont("medium")
|
||||
|
|
|
@ -19,7 +19,6 @@ Item
|
|||
{
|
||||
id: titleLabel
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.getSize("wide_margin").height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@label", "Help us to improve Ultimaker Cura")
|
||||
|
@ -32,11 +31,15 @@ Item
|
|||
Item
|
||||
{
|
||||
id: contentsArea
|
||||
anchors.top: titleLabel.bottom
|
||||
anchors.bottom: getStartedButton.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
|
||||
anchors
|
||||
{
|
||||
top: titleLabel.bottom
|
||||
bottom: getStartedButton.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
topMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
Column
|
||||
{
|
||||
|
@ -87,7 +90,6 @@ Item
|
|||
id: getStartedButton
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
text: catalog.i18nc("@button", "Next")
|
||||
onClicked: base.showNextPage()
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ Item
|
|||
{
|
||||
id: titleLabel
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.getSize("wide_margin").height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: machineActionsModel.currentItem.title == undefined ? "" : machineActionsModel.currentItem.title
|
||||
|
@ -51,11 +50,13 @@ Item
|
|||
|
||||
Item
|
||||
{
|
||||
anchors.top: titleLabel.bottom
|
||||
anchors.bottom: nextButton.top
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors
|
||||
{
|
||||
top: titleLabel.bottom
|
||||
bottom: nextButton.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
|
||||
data: machineActionsModel.currentItem.content == undefined ? emptyItem : machineActionsModel.currentItem.content
|
||||
}
|
||||
|
@ -71,7 +72,6 @@ Item
|
|||
id: nextButton
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
text: catalog.i18nc("@button", "Next")
|
||||
onClicked: machineActionsModel.goToNextAction()
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ Item
|
|||
{
|
||||
id: titleLabel
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.getSize("wide_margin").height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@label", "User Agreement")
|
||||
|
@ -27,21 +26,16 @@ Item
|
|||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Item // Area for pictures and texts
|
||||
{
|
||||
anchors.top: titleLabel.bottom
|
||||
anchors.bottom: agreeButton.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
|
||||
Label
|
||||
{
|
||||
id: disclaimerLineLabel
|
||||
anchors.centerIn: parent
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
|
||||
width: (parent.width * 2 / 3) | 0
|
||||
anchors
|
||||
{
|
||||
top: titleLabel.bottom
|
||||
topMargin: UM.Theme.getSize("wide_margin").height
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
|
||||
text: "<p><b>Disclaimer by Ultimaker</b></p>"
|
||||
+ "<p>Please read this disclaimer carefully.</p>"
|
||||
|
@ -52,14 +46,12 @@ Item
|
|||
font: UM.Theme.getFont("default")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
id: agreeButton
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
text: catalog.i18nc("@button", "Agree")
|
||||
onClicked:
|
||||
{
|
||||
|
@ -74,7 +66,6 @@ Item
|
|||
id: declineButton
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
text: catalog.i18nc("@button", "Decline and close")
|
||||
onClicked:
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ Item
|
|||
{
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
|
||||
Column // Arrange the items vertically and put everything in the center
|
||||
{
|
||||
anchors.centerIn: parent
|
||||
|
|
|
@ -19,7 +19,6 @@ Item
|
|||
{
|
||||
id: titleLabel
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.getSize("wide_margin").height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: catalog.i18nc("@label", "What's new in Ultimaker Cura")
|
||||
|
@ -34,8 +33,8 @@ Item
|
|||
anchors.bottom: getStartedButton.top
|
||||
anchors.topMargin: UM.Theme.getSize("wide_margin").height
|
||||
anchors.bottomMargin: UM.Theme.getSize("wide_margin").height
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: (parent.width * 3 / 4) | 0
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
border.color: "#dfdfdf"
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
|
@ -65,7 +64,6 @@ Item
|
|||
id: getStartedButton
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: UM.Theme.getSize("wide_margin").width
|
||||
text: catalog.i18nc("@button", "Next")
|
||||
onClicked: base.showNextPage()
|
||||
}
|
||||
|
|
|
@ -61,7 +61,8 @@ Item
|
|||
id: contentLoader
|
||||
anchors
|
||||
{
|
||||
margins: UM.Theme.getSize("default_margin").width
|
||||
margins: UM.Theme.getSize("wide_margin").width
|
||||
bottomMargin: UM.Theme.getSize("default_margin").width
|
||||
top: progressBar.bottom
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue