mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Merge branch '4.0' into STAR-322_cloud-connection
This commit is contained in:
commit
2e3398e349
10 changed files with 118 additions and 87 deletions
|
@ -31,6 +31,13 @@ Column
|
|||
id: information
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
PrintInformationWidget
|
||||
{
|
||||
id: printInformationPanel
|
||||
visible: !preSlicedData
|
||||
anchors.right: parent.right
|
||||
}
|
||||
|
||||
Column
|
||||
{
|
||||
|
@ -50,15 +57,7 @@ Column
|
|||
|
||||
text: preSlicedData ? catalog.i18nc("@label", "No time estimation available") : PrintInformation.currentPrintTime.getDisplayString(UM.DurationFormat.Long)
|
||||
source: UM.Theme.getIcon("clock")
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
|
||||
PrintInformationWidget
|
||||
{
|
||||
id: printInformationPanel
|
||||
visible: !preSlicedData
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: parent.contentWidth + UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
font: UM.Theme.getFont("medium_bold")
|
||||
}
|
||||
|
||||
Cura.IconWithText
|
||||
|
@ -91,43 +90,8 @@ Column
|
|||
return totalWeights + "g · " + totalLengths.toFixed(2) + "m"
|
||||
}
|
||||
source: UM.Theme.getIcon("spool")
|
||||
|
||||
Item
|
||||
{
|
||||
id: additionalComponents
|
||||
width: childrenRect.width
|
||||
anchors.right: parent.right
|
||||
height: parent.height
|
||||
Row
|
||||
{
|
||||
id: additionalComponentsRow
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
}
|
||||
Component.onCompleted: addAdditionalComponents("saveButton")
|
||||
|
||||
Connections
|
||||
{
|
||||
target: CuraApplication
|
||||
onAdditionalComponentsChanged: addAdditionalComponents("saveButton")
|
||||
}
|
||||
|
||||
function addAdditionalComponents (areaId)
|
||||
{
|
||||
if(areaId == "saveButton")
|
||||
{
|
||||
for (var component in CuraApplication.additionalComponents["saveButton"])
|
||||
{
|
||||
CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Item
|
||||
|
|
|
@ -110,8 +110,7 @@ Column
|
|||
|
||||
height: parent.height
|
||||
|
||||
anchors.right: additionalComponents.left
|
||||
anchors.rightMargin: additionalComponents.width != 0 ? UM.Theme.getSize("default_margin").width : 0
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
|
||||
text: catalog.i18nc("@button", "Slice")
|
||||
|
@ -128,45 +127,12 @@ Column
|
|||
height: parent.height
|
||||
anchors.left: parent.left
|
||||
|
||||
anchors.right: additionalComponents.left
|
||||
anchors.rightMargin: additionalComponents.width != 0 ? UM.Theme.getSize("default_margin").width : 0
|
||||
anchors.right: parent.right
|
||||
text: catalog.i18nc("@button", "Cancel")
|
||||
enabled: sliceButton.enabled
|
||||
visible: !sliceButton.visible
|
||||
onClicked: sliceOrStopSlicing()
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: additionalComponents
|
||||
width: childrenRect.width
|
||||
anchors.right: parent.right
|
||||
height: parent.height
|
||||
Row
|
||||
{
|
||||
id: additionalComponentsRow
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
}
|
||||
Component.onCompleted: prepareButtons.addAdditionalComponents("saveButton")
|
||||
|
||||
Connections
|
||||
{
|
||||
target: CuraApplication
|
||||
onAdditionalComponentsChanged: prepareButtons.addAdditionalComponents("saveButton")
|
||||
}
|
||||
|
||||
function addAdditionalComponents (areaId)
|
||||
{
|
||||
if(areaId == "saveButton")
|
||||
{
|
||||
for (var component in CuraApplication.additionalComponents["saveButton"])
|
||||
{
|
||||
CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -248,6 +248,7 @@ UM.MainWindow
|
|||
|
||||
Cura.ActionPanelWidget
|
||||
{
|
||||
id: actionPanelWidget
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.rightMargin: UM.Theme.getSize("thick_margin").width
|
||||
|
@ -269,6 +270,39 @@ UM.MainWindow
|
|||
visible: CuraApplication.platformActivity && (main.item == null || !qmlTypeOf(main.item, "QQuickRectangle"))
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: additionalComponents
|
||||
width: childrenRect.width
|
||||
anchors.right: actionPanelWidget.left
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.bottom: actionPanelWidget.bottom
|
||||
anchors.bottomMargin: UM.Theme.getSize("thick_margin").height * 2
|
||||
visible: actionPanelWidget.visible
|
||||
Row
|
||||
{
|
||||
id: additionalComponentsRow
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: contentItem.addAdditionalComponents()
|
||||
|
||||
Connections
|
||||
{
|
||||
target: CuraApplication
|
||||
onAdditionalComponentsChanged: contentItem.addAdditionalComponents("saveButton")
|
||||
}
|
||||
|
||||
function addAdditionalComponents()
|
||||
{
|
||||
for (var component in CuraApplication.additionalComponents["saveButton"])
|
||||
{
|
||||
CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow
|
||||
}
|
||||
}
|
||||
|
||||
Loader
|
||||
{
|
||||
// A stage can control this area. If nothing is set, it will therefore show the 3D view.
|
||||
|
|
|
@ -23,7 +23,7 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
// This component will appear when there is no configurations (e.g. when losing connection)
|
||||
// This component will appear when there are no configurations (e.g. when losing connection or when they are being loaded)
|
||||
Item
|
||||
{
|
||||
width: parent.width
|
||||
|
@ -51,7 +51,11 @@ Item
|
|||
anchors.left: icon.right
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@label", "Downloading the configurations from the remote printer")
|
||||
// There are two cases that we want to diferenciate, one is when Cura is loading the configurations and the
|
||||
// other when the connection was lost
|
||||
text: Cura.MachineManager.printerConnected ?
|
||||
catalog.i18nc("@label", "Loading available configurations from the printer...") :
|
||||
catalog.i18nc("@label", "The configurations are not available because the printer is disconnected.")
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("default")
|
||||
renderType: Text.NativeRendering
|
||||
|
|
|
@ -173,6 +173,59 @@ Cura.ExpandablePopup
|
|||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
height: visible ? childrenRect.height: 0
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
width: childrenRect.width + UM.Theme.getSize("default_margin").width
|
||||
visible: popupItem.configuration_method == ConfigurationMenu.ConfigurationMethod.Custom
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: externalLinkIcon
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
height: materialInfoLabel.height
|
||||
width: height
|
||||
sourceSize.height: width
|
||||
color: UM.Theme.getColor("text_link")
|
||||
source: UM.Theme.getIcon("external_link")
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: materialInfoLabel
|
||||
wrapMode: Text.WordWrap
|
||||
text: catalog.i18nc("@label", "See the material compatibility chart")
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text_link")
|
||||
linkColor: UM.Theme.getColor("text_link")
|
||||
anchors.left: externalLinkIcon.right
|
||||
anchors.leftMargin: UM.Theme.getSize("narrow_margin").width
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked:
|
||||
{
|
||||
// open the material URL with web browser
|
||||
var url = "https://ultimaker.com/incoming-links/cura/material-compatibilty"
|
||||
Qt.openUrlExternally(url)
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
materialInfoLabel.font.underline = true
|
||||
}
|
||||
onExited:
|
||||
{
|
||||
materialInfoLabel.font.underline = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: separator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue