mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-02 16:54:23 +08:00

We created a new set of icons for Cura. These icons had to be reverted though because they weren't working out in the interface for the last release yet. This unreverts them, basically adding them back hoping that we'll get them fixed in time for the next release. Contributes to issue CURA-8342. Revert "Revert "Fix merge conflict"" This reverts commit bb20e3307f43edc1ff53cb154d2351ddfe39e158. Revert "Revert "Merge pull request #9716 from Ultimaker/CURA-8010_new_icons"" This reverts commit 70e4e9640e561e18a12870f30c905203ce8ccee7. Revert "Revert "Fix typo in icon name"" This reverts commit 38ce22ba7c3f40b971bc6e1e0a8e776ca9d51512. Revert "Revert "Add list for deprecated icons"" This reverts commit 119a957e7f978dbf1ddbcb3b0005bf38e8fed943. Revert "Revert "Add Function icon"" This reverts commit 760726cf0bb953bb1b0fc277b448f419d4bd2544. Revert "Revert "Switch out inherit icon"" This reverts commit 26afff609381e2004d194c280f504b6226859bd3. Revert "Revert "Merge branch 'CURA-8205_Introduce_new_icons_in_Cura' of github.com:Ultimaker/Cura"" This reverts commit 6483db3d47ee052c1a966cdee3af7190577a5769. Revert "Fix incorrect icons" This reverts commit 02a4ade2a50a943ff36fd4895bdc9261cf2133eb.
245 lines
8.9 KiB
QML
245 lines
8.9 KiB
QML
// 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" }
|
|
|
|
signal cloudPrintersDetected(bool newCloudPrintersDetected)
|
|
|
|
Component.onCompleted: CuraApplication.getDiscoveredCloudPrintersModel().cloudPrintersDetectedChanged.connect(cloudPrintersDetected)
|
|
|
|
onCloudPrintersDetected:
|
|
{
|
|
// When the user signs in successfully, it will be checked whether he/she has cloud printers connected to
|
|
// the account. If he/she does, then the welcome wizard will show a summary of the Cloud printers linked to the
|
|
// account. If there are no cloud printers, then proceed to the next page (if any)
|
|
if(newCloudPrintersDetected)
|
|
{
|
|
base.goToPage("add_cloud_printers")
|
|
}
|
|
else
|
|
{
|
|
base.showNextPage()
|
|
}
|
|
}
|
|
|
|
// Area where the cloud contents can be put. Pictures, texts and such.
|
|
Item
|
|
{
|
|
id: cloudContentsArea
|
|
anchors
|
|
{
|
|
top: parent.top
|
|
bottom: skipButton.top
|
|
left: parent.left
|
|
right: parent.right
|
|
}
|
|
|
|
// Pictures and texts are arranged using Columns with spacing. The whole picture and text area is centered in
|
|
// the cloud contents area.
|
|
Column
|
|
{
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
width: parent.width
|
|
height: childrenRect.height
|
|
|
|
spacing: UM.Theme.getSize("thick_margin").height
|
|
|
|
Label
|
|
{
|
|
id: titleLabel
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
horizontalAlignment: Text.AlignHCenter
|
|
text: catalog.i18nc("@label", "Sign in to the Ultimaker platform")
|
|
color: UM.Theme.getColor("primary_button")
|
|
font: UM.Theme.getFont("huge")
|
|
renderType: Text.NativeRendering
|
|
}
|
|
|
|
// Filler item
|
|
Item
|
|
{
|
|
height: UM.Theme.getSize("default_margin").height
|
|
width: parent.width
|
|
}
|
|
|
|
// Cloud image
|
|
Image
|
|
{
|
|
id: cloudImage
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
source: UM.Theme.getImage("first_run_ultimaker_cloud")
|
|
fillMode: Image.PreserveAspectFit
|
|
width: UM.Theme.getSize("welcome_wizard_content_image_big").width
|
|
sourceSize.width: width
|
|
sourceSize.height: height
|
|
}
|
|
|
|
|
|
// Filler item
|
|
Item
|
|
{
|
|
height: UM.Theme.getSize("default_margin").height
|
|
width: parent.width
|
|
}
|
|
|
|
// Motivational icons
|
|
Row
|
|
{
|
|
id: motivationRow
|
|
width: parent.width
|
|
|
|
Column
|
|
{
|
|
id: marketplaceColumn
|
|
width: Math.round(parent.width / 3)
|
|
spacing: UM.Theme.getSize("default_margin").height
|
|
|
|
Image
|
|
{
|
|
id: marketplaceImage
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
fillMode: Image.PreserveAspectFit
|
|
width: UM.Theme.getSize("welcome_wizard_cloud_content_image").width
|
|
source: UM.Theme.getIcon("Plugin")
|
|
sourceSize.width: width
|
|
sourceSize.height: height
|
|
}
|
|
Label
|
|
{
|
|
id: marketplaceTextLabel
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
width: parent.width
|
|
text: catalog.i18nc("@text", "Add material settings and plugins from the Marketplace")
|
|
wrapMode: Text.Wrap
|
|
horizontalAlignment: Text.AlignHCenter
|
|
color: UM.Theme.getColor("text")
|
|
font: UM.Theme.getFont("default")
|
|
renderType: Text.NativeRendering
|
|
}
|
|
}
|
|
|
|
Column
|
|
{
|
|
id: syncColumn
|
|
width: Math.round(parent.width / 3)
|
|
spacing: UM.Theme.getSize("default_margin").height
|
|
|
|
Image
|
|
{
|
|
id: syncImage
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
fillMode: Image.PreserveAspectFit
|
|
width: UM.Theme.getSize("welcome_wizard_cloud_content_image").width
|
|
source: UM.Theme.getIcon("Spool")
|
|
sourceSize.width: width
|
|
sourceSize.height: height
|
|
}
|
|
Label
|
|
{
|
|
id: syncTextLabel
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
width: parent.width
|
|
text: catalog.i18nc("@text", "Backup and sync your material settings and plugins")
|
|
wrapMode: Text.Wrap
|
|
horizontalAlignment: Text.AlignHCenter
|
|
color: UM.Theme.getColor("text")
|
|
font: UM.Theme.getFont("default")
|
|
renderType: Text.NativeRendering
|
|
}
|
|
}
|
|
|
|
Column
|
|
{
|
|
id: communityColumn
|
|
width: Math.round(parent.width / 3)
|
|
spacing: UM.Theme.getSize("default_margin").height
|
|
|
|
Image
|
|
{
|
|
id: communityImage
|
|
anchors.horizontalCenter: communityColumn.horizontalCenter
|
|
fillMode: Image.PreserveAspectFit
|
|
width: UM.Theme.getSize("welcome_wizard_cloud_content_image").width
|
|
source: UM.Theme.getIcon("PrinterTriple", "medium")
|
|
sourceSize.width: width
|
|
sourceSize.height: height
|
|
}
|
|
Label
|
|
{
|
|
id: communityTextLabel
|
|
anchors.horizontalCenter: communityColumn.horizontalCenter
|
|
width: parent.width
|
|
text: catalog.i18nc("@text", "Share ideas and get help from 48,000+ users in the Ultimaker Community")
|
|
wrapMode: Text.Wrap
|
|
horizontalAlignment: Text.AlignHCenter
|
|
color: UM.Theme.getColor("text")
|
|
font: UM.Theme.getFont("default")
|
|
renderType: Text.NativeRendering
|
|
}
|
|
}
|
|
}
|
|
|
|
// Sign in Button
|
|
Cura.PrimaryButton
|
|
{
|
|
id: signInButton
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
text: catalog.i18nc("@button", "Sign in")
|
|
onClicked: Cura.API.account.login()
|
|
// Content Item is used in order to align the text inside the button. Without it, when resizing the
|
|
// button, the text will be aligned on the left
|
|
contentItem: Text {
|
|
text: signInButton.text
|
|
font: UM.Theme.getFont("medium")
|
|
color: UM.Theme.getColor("primary_text")
|
|
horizontalAlignment: Text.AlignHCenter
|
|
verticalAlignment: Text.AlignVCenter
|
|
}
|
|
}
|
|
|
|
// Create an account button
|
|
Cura.TertiaryButton
|
|
{
|
|
id: createAccountButton
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
text: catalog.i18nc("@text", "Create a free Ultimaker Account")
|
|
onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create")
|
|
}
|
|
}
|
|
}
|
|
|
|
// The "Skip" button exists on the bottom right
|
|
Label
|
|
{
|
|
id: skipButton
|
|
anchors.right: parent.right
|
|
anchors.bottom: parent.bottom
|
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
|
text: catalog.i18nc("@button", "Skip")
|
|
color: UM.Theme.getColor("secondary_button_text")
|
|
font: UM.Theme.getFont("medium")
|
|
renderType: Text.NativeRendering
|
|
|
|
MouseArea
|
|
{
|
|
anchors.fill: parent
|
|
hoverEnabled: true
|
|
onClicked: base.showNextPage()
|
|
onEntered: parent.font.underline = true
|
|
onExited: parent.font.underline = false
|
|
}
|
|
}
|
|
}
|