Merge pull request #13772 from Ultimaker/CURA-8689_add_first_cloud_printer_tweaks

Cura 8689 add first cloud printer tweaks
This commit is contained in:
Casper Lamboo 2022-11-09 14:55:29 +01:00 committed by GitHub
commit db57c8fb43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 123 additions and 20 deletions

View file

@ -50,6 +50,7 @@ Control
PrinterCard PrinterCard
{ {
id: ultimakerPrinterCard id: ultimakerPrinterCard
Layout.alignment: Qt.AlignBottom
onClicked: goToUltimakerPrinter onClicked: goToUltimakerPrinter
text: catalog.i18nc("@button", "Ultimaker printer") text: catalog.i18nc("@button", "Ultimaker printer")
imageSource: UM.Theme.getImage("ultimaker_printer") imageSource: UM.Theme.getImage("ultimaker_printer")
@ -58,6 +59,7 @@ Control
PrinterCard PrinterCard
{ {
id: thrirdPartyPrinterCard id: thrirdPartyPrinterCard
Layout.alignment: Qt.AlignBottom
onClicked: goToThirdPartyPrinter onClicked: goToThirdPartyPrinter
text: catalog.i18nc("@button", "Non Ultimaker printer") text: catalog.i18nc("@button", "Non Ultimaker printer")
imageSource: UM.Theme.getImage("third_party_printer") imageSource: UM.Theme.getImage("third_party_printer")

View file

@ -22,10 +22,6 @@ Control
{ {
base.goToPage("add_cloud_printers") base.goToPage("add_cloud_printers")
} }
else
{
goToThirdPartyPrinter()
}
} }
contentItem: ColumnLayout contentItem: ColumnLayout
@ -39,7 +35,7 @@ Control
RowLayout RowLayout
{ {
Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter
Image Image
{ {
@ -51,30 +47,42 @@ Control
ColumnLayout ColumnLayout
{ {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: false
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
UM.Label UM.Label
{ {
Layout.fillWidth: true Layout.fillWidth: false
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font: UM.Theme.getFont("default_bold") font: UM.Theme.getFont("default_bold")
text: catalog.i18nc("@label", "If you are trying to add a new Ultimaker printer to Cura") text: catalog.i18nc("@label", "If you are trying to add a new Ultimaker printer to Cura")
} }
UM.Label ColumnLayout
{ {
Layout.fillWidth: true spacing: 0
Layout.alignment: Qt.AlignTop
wrapMode: Text.WordWrap FontMetrics
text: { {
const steps = [ id: fontMetrics
font: UM.Theme.getFont("default")
}
Repeater {
model: [
catalog.i18nc("@info", "Sign in into Ultimaker Digilal Factory"), catalog.i18nc("@info", "Sign in into Ultimaker Digilal Factory"),
catalog.i18nc("@info", "Follow the procedure to add a new printer"), catalog.i18nc("@info", "Follow the procedure to add a new printer"),
catalog.i18nc("@info", "Your new printer will automatically appear in Cura"), catalog.i18nc("@info", "Your new printer will automatically appear in Cura"),
]; ]
return steps.join("<br />"); UM.Label
{
Layout.alignment: Qt.AlignTop
font: fontMetrics.font
Layout.preferredHeight: fontMetrics.height
text: `${index + 1}. ${modelData}`
}
} }
} }
@ -83,6 +91,7 @@ Control
id: learnMoreButton id: learnMoreButton
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
leftPadding: 0
text: catalog.i18nc("@button", "Learn more") text: catalog.i18nc("@button", "Learn more")
iconSource: UM.Theme.getIcon("LinkExternal") iconSource: UM.Theme.getIcon("LinkExternal")
isIconOnRightSide: true isIconOnRightSide: true
@ -115,6 +124,7 @@ Control
text: catalog.i18nc("@button", "Sign in to Digital Factory") text: catalog.i18nc("@button", "Sign in to Digital Factory")
onClicked: function() onClicked: function()
{ {
Qt.openUrlExternally("https://digitalfactory.ultimaker.com/app/printers?add_printer=true&utm_source=cura&utm_medium=software&utm_campaign=onboarding-add-printer")
text = catalog.i18nc("@button", "Waiting for new printers") text = catalog.i18nc("@button", "Waiting for new printers")
busy = true; busy = true;
enabled = false; enabled = false;

View file

@ -42,7 +42,6 @@ Control
onClicked: root.onClicked && root.onClicked() onClicked: root.onClicked && root.onClicked()
} }
topPadding: UM.Theme.getSize("wide_margin").height
rightPadding: UM.Theme.getSize("wide_margin").width rightPadding: UM.Theme.getSize("wide_margin").width
bottomPadding: UM.Theme.getSize("wide_margin").height bottomPadding: UM.Theme.getSize("wide_margin").height
leftPadding: UM.Theme.getSize("wide_margin").width leftPadding: UM.Theme.getSize("wide_margin").width
@ -50,7 +49,7 @@ Control
background: Rectangle background: Rectangle
{ {
id: background id: background
anchors.fill: parent height: parent.height
border.color: UM.Theme.getColor("primary_button") border.color: UM.Theme.getColor("primary_button")
color: "transparent" color: "transparent"
border.width: 1 border.width: 1
@ -59,6 +58,7 @@ Control
contentItem: ColumnLayout contentItem: ColumnLayout
{ {
id: column
spacing: UM.Theme.getSize("wide_margin").height spacing: UM.Theme.getSize("wide_margin").height
height: childrenRect.height height: childrenRect.height
width: childrenRect.width width: childrenRect.width
@ -68,7 +68,6 @@ Control
id: image id: image
source: imageSource source: imageSource
width: 180 * screenScaleFactor width: 180 * screenScaleFactor
height: 180 * screenScaleFactor
sourceSize.width: width sourceSize.width: width
sourceSize.height: height sourceSize.height: height
} }

View file

@ -1,2 +1,60 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 248 216"><style>.cls-1,.cls-2,.cls-5{fill:none;}.cls-1,.cls-2,.cls-5,.cls-7{stroke:#061884;stroke-miterlimit:10;}.cls-1,.cls-2{stroke-linecap:round;}.cls-1,.cls-5,.cls-7{stroke-width:2px;}.cls-2{stroke-width:4px;}.cls-3,.cls-6,.cls-7{fill:#f3f8fe;}.cls-4{fill:#dde9fd;}.cls-6{fill-rule:evenodd;}.cls-8{fill:#061884;}.cls-9{fill:#c5dbfb;}</style> <svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Third-party-printer"><g id="Third-party-printer-2" data-name="Third-party-printer"><line id="Footing" class="cls-1" x1="1" y1="215" x2="247" y2="215"/><path class="cls-2" d="M42,202c-3.68-5.09-18.7-61.92-9-108.42,1.5-7.23,6-36.3,35.85-43.6C116.31,38.35,124.28,80.11,126,82.92"/><rect class="cls-3" x="42.5" y="18.5" width="19" height="171"/><path class="cls-4" d="M60,20V188H44V20H60m3-3H41V191H63V17Z"/><rect class="cls-5" x="41" y="17" width="22" height="174"/><rect class="cls-3" x="186.5" y="18.5" width="19" height="173"/><path class="cls-4" d="M204,20V190H188V20h16m3-3H185V193h22V17Z"/><rect class="cls-5" x="185" y="17" width="22" height="176"/><rect class="cls-3" x="39.5" y="2.5" width="169" height="13"/><path class="cls-4" d="M207,4V14H41V4H207m3-3H38V17H210V1Z"/><rect class="cls-5" x="38" y="1" width="172" height="16"/><rect class="cls-3" x="29.5" y="86.5" width="189" height="7"/><path class="cls-4" d="M217,88v4H31V88H217m3-3H28V95H220V85Z"/><rect class="cls-5" x="28" y="85" width="192" height="10"/><path class="cls-6" d="M102.5,97.5V80a1.5,1.5,0,0,1,1.5-1.5h27.5v19Z"/><path class="cls-4" d="M130,80V96H104V80h26m3-3H104a3,3,0,0,0-3,3V99h32V77Z"/><path class="cls-5" d="M133,99H101V80a3,3,0,0,1,3-3h29Z"/><rect class="cls-3" x="115.5" y="84.5" width="19" height="19"/><path class="cls-4" d="M133,86v16H117V86h16m3-3H114v22h22V83Z"/><rect class="cls-5" x="114" y="83" width="22" height="22"/><path class="cls-7" d="M44,90v16a5,5,0,0,1-8.54,3.54L22.88,97A3,3,0,0,1,22,94.83V85.17a3,3,0,0,1,.88-2.12L35.46,70.46A5,5,0,0,1,44,74Z"/><circle class="cls-8" cx="38.5" cy="74.5" r="2.5"/><circle class="cls-8" cx="38.5" cy="105.5" r="2.5"/><path class="cls-7" d="M220,72a4.93,4.93,0,0,0-.38-1.91,5,5,0,0,0-6.53-2.71L170.56,85H220Z"/><circle class="cls-8" cx="214.67" cy="72.5" r="2.5"/><path class="cls-7" d="M220,108a4.93,4.93,0,0,1-.38,1.91,5,5,0,0,1-6.53,2.71L170.56,95H220Z"/><circle class="cls-8" cx="214.67" cy="107.5" r="2.5"/><rect class="cls-3" x="122.5" y="196.5" width="63" height="17"/><path class="cls-4" d="M184,198v14H124V198h60m3-3H121v20h66V195Z"/><rect class="cls-5" x="121" y="195" width="66" height="20"/><rect class="cls-3" x="124.5" y="184.5" width="19" height="19"/><path class="cls-4" d="M142,186v16H126V186h16m3-3H123v22h22V183Z"/><rect class="cls-5" x="123" y="183" width="22" height="22"/><line class="cls-5" x1="72" y1="183" x2="176" y2="183"/><line class="cls-5" x1="68" y1="176" x2="180" y2="176"/><line class="cls-5" x1="77" y1="183" x2="77" y2="177"/><line class="cls-5" x1="171" y1="183" x2="171" y2="177"/><rect class="cls-3" x="42.5" y="192.5" width="79" height="21"/><path class="cls-4" d="M120,194v18H44V194h76m3-3H41v24h82V191Z"/><rect class="cls-5" x="41" y="191" width="82" height="24"/><circle class="cls-8" cx="48.5" cy="198.5" r="2.5"/><circle class="cls-8" cx="57.5" cy="207.5" r="2.5"/><rect class="cls-3" x="186.5" y="175.5" width="43" height="14"/><path class="cls-4" d="M228,177v11H188V177h40m3-3H185v17h46V174Z"/><rect class="cls-5" x="185" y="174" width="46" height="17"/><rect class="cls-3" x="186.5" y="192.5" width="43" height="21"/><path class="cls-4" d="M228,194v18H188V194h40m3-3H185v24h46V191Z"/><rect class="cls-5" x="185" y="191" width="46" height="24"/><circle class="cls-8" cx="201.5" cy="198.5" r="2.5"/><circle class="cls-8" cx="192.5" cy="207.5" r="2.5"/><rect class="cls-9" x="107" y="143" width="32" height="32"/></g></g></svg> <g clip-path="url(#clip0_560_27359)">
<path d="M27 280H273" stroke="#061884" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round"/>
<path d="M68.0001 267C64.3201 261.91 49.3001 205.08 59.0001 158.58C60.5001 151.35 65.0001 122.28 94.8501 114.98C142.31 103.35 150.28 145.11 152 147.92" stroke="#061884" stroke-width="4" stroke-miterlimit="10" stroke-linecap="round"/>
<path d="M87.5 83.5H68.5V254.5H87.5V83.5Z" fill="#F3F8FE"/>
<path d="M86 85V253H70V85H86ZM89 82H67V256H89V82Z" fill="#DDE9FD"/>
<path d="M89 82H67V256H89V82Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M231.5 83.5H212.5V256.5H231.5V83.5Z" fill="#F3F8FE"/>
<path d="M230 85V255H214V85H230ZM233 82H211V258H233V82Z" fill="#DDE9FD"/>
<path d="M233 82H211V258H233V82Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M234.5 67.5H65.5V80.5H234.5V67.5Z" fill="#F3F8FE"/>
<path d="M233 69V79H67V69H233ZM236 66H64V82H236V66Z" fill="#DDE9FD"/>
<path d="M236 66H64V82H236V66Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M244.5 151.5H55.5V158.5H244.5V151.5Z" fill="#F3F8FE"/>
<path d="M243 153V157H57V153H243ZM246 150H54V160H246V150Z" fill="#DDE9FD"/>
<path d="M246 150H54V160H246V150Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M128.5 162.5V145C128.5 144.602 128.658 144.221 128.939 143.939C129.221 143.658 129.602 143.5 130 143.5H157.5V162.5H128.5Z" fill="#F3F8FE"/>
<path d="M156 145V161H130V145H156ZM159 142H130C129.204 142 128.441 142.316 127.879 142.879C127.316 143.441 127 144.204 127 145V164H159V142Z" fill="#DDE9FD"/>
<path d="M159 164H127V145C127 144.204 127.316 143.441 127.879 142.879C128.441 142.316 129.204 142 130 142H159V164Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M160.5 149.5H141.5V168.5H160.5V149.5Z" fill="#F3F8FE"/>
<path d="M159 151V167H143V151H159ZM162 148H140V170H162V148Z" fill="#DDE9FD"/>
<path d="M162 148H140V170H162V148Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M69.9999 155V171C70.0017 171.99 69.7094 172.959 69.1601 173.782C68.6108 174.606 67.8292 175.249 66.9145 175.628C65.9998 176.007 64.9931 176.106 64.022 175.912C63.0509 175.719 62.1592 175.241 61.4599 174.54L48.8799 162C48.5952 161.716 48.3706 161.377 48.2194 161.004C48.0682 160.632 47.9936 160.232 47.9999 159.83V150.17C48.0006 149.375 48.3171 148.612 48.8799 148.05L61.4599 135.46C62.1592 134.759 63.0509 134.281 64.022 134.088C64.9931 133.894 65.9998 133.993 66.9145 134.372C67.8292 134.751 68.6108 135.393 69.1601 136.217C69.7094 137.041 70.0017 138.01 69.9999 139V155Z" fill="#F3F8FE" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M64.5 142C65.8807 142 67 140.881 67 139.5C67 138.119 65.8807 137 64.5 137C63.1193 137 62 138.119 62 139.5C62 140.881 63.1193 142 64.5 142Z" fill="#061884"/>
<path d="M64.5 173C65.8807 173 67 171.881 67 170.5C67 169.119 65.8807 168 64.5 168C63.1193 168 62 169.119 62 170.5C62 171.881 63.1193 173 64.5 173Z" fill="#061884"/>
<path d="M246 137C246.002 136.344 245.872 135.695 245.62 135.09C245.113 133.865 244.141 132.891 242.916 132.383C241.692 131.875 240.315 131.874 239.09 132.38L196.56 150H246V137Z" fill="#F3F8FE" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M240.67 140C242.051 140 243.17 138.881 243.17 137.5C243.17 136.119 242.051 135 240.67 135C239.289 135 238.17 136.119 238.17 137.5C238.17 138.881 239.289 140 240.67 140Z" fill="#061884"/>
<path d="M246 173C246.002 173.656 245.872 174.305 245.62 174.91C245.113 176.135 244.141 177.109 242.916 177.617C241.692 178.125 240.315 178.126 239.09 177.62L196.56 160H246V173Z" fill="#F3F8FE" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M240.67 175C242.051 175 243.17 173.881 243.17 172.5C243.17 171.119 242.051 170 240.67 170C239.289 170 238.17 171.119 238.17 172.5C238.17 173.881 239.289 175 240.67 175Z" fill="#061884"/>
<path d="M211.5 261.5H148.5V278.5H211.5V261.5Z" fill="#F3F8FE"/>
<path d="M210 263V277H150V263H210ZM213 260H147V280H213V260Z" fill="#DDE9FD"/>
<path d="M213 260H147V280H213V260Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M169.5 249.5H150.5V268.5H169.5V249.5Z" fill="#F3F8FE"/>
<path d="M168 251V267H152V251H168ZM171 248H149V270H171V248Z" fill="#DDE9FD"/>
<path d="M171 248H149V270H171V248Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M98 248H202" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M94 241H206" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M103 248V242" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M197 248V242" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M147.5 257.5H68.5V278.5H147.5V257.5Z" fill="#F3F8FE"/>
<path d="M146 259V277H70V259H146ZM149 256H67V280H149V256Z" fill="#DDE9FD"/>
<path d="M149 256H67V280H149V256Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M74.5 266C75.8807 266 77 264.881 77 263.5C77 262.119 75.8807 261 74.5 261C73.1193 261 72 262.119 72 263.5C72 264.881 73.1193 266 74.5 266Z" fill="#061884"/>
<path d="M83.5 275C84.8807 275 86 273.881 86 272.5C86 271.119 84.8807 270 83.5 270C82.1193 270 81 271.119 81 272.5C81 273.881 82.1193 275 83.5 275Z" fill="#061884"/>
<path d="M255.5 240.5H212.5V254.5H255.5V240.5Z" fill="#F3F8FE"/>
<path d="M254 242V253H214V242H254ZM257 239H211V256H257V239Z" fill="#DDE9FD"/>
<path d="M257 239H211V256H257V239Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M255.5 257.5H212.5V278.5H255.5V257.5Z" fill="#F3F8FE"/>
<path d="M254 259V277H214V259H254ZM257 256H211V280H257V256Z" fill="#DDE9FD"/>
<path d="M257 256H211V280H257V256Z" stroke="#061884" stroke-width="2" stroke-miterlimit="10"/>
<path d="M227.5 266C228.881 266 230 264.881 230 263.5C230 262.119 228.881 261 227.5 261C226.119 261 225 262.119 225 263.5C225 264.881 226.119 266 227.5 266Z" fill="#061884"/>
<path d="M218.5 275C219.881 275 221 273.881 221 272.5C221 271.119 219.881 270 218.5 270C217.119 270 216 271.119 216 272.5C216 273.881 217.119 275 218.5 275Z" fill="#061884"/>
<path d="M165 208H133V240H165V208Z" fill="#C5DBFB"/>
</g>
<defs>
<clipPath id="clip0_560_27359">
<rect width="248" height="216" fill="white" transform="translate(26 65)"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After