Merge branch '4.0' into STAR-322_cloud-connection

This commit is contained in:
ChrisTerBeke 2019-01-11 15:10:44 +01:00
commit 2e3398e349
10 changed files with 118 additions and 87 deletions

View File

@ -10,6 +10,8 @@ DEFAULT_CLOUD_ACCOUNT_API_ROOT = "https://account.ultimaker.com" # type: str
try:
from cura.CuraVersion import CuraCloudAPIRoot # type: ignore
if CuraCloudAPIRoot == "":
CuraCloudAPIRoot = DEFAULT_CLOUD_API_ROOT
except ImportError:
CuraCloudAPIRoot = DEFAULT_CLOUD_API_ROOT
@ -20,5 +22,7 @@ except ImportError:
try:
from cura.CuraVersion import CuraCloudAccountAPIRoot # type: ignore
if CuraCloudAccountAPIRoot == "":
CuraCloudAccountAPIRoot = DEFAULT_CLOUD_ACCOUNT_API_ROOT
except ImportError:
CuraCloudAccountAPIRoot = DEFAULT_CLOUD_ACCOUNT_API_ROOT

View File

@ -488,7 +488,7 @@ UM.Dialog
{
objectName: "postProcessingSaveAreaButton"
visible: activeScriptsList.count > 0
height: UM.Theme.getSize("save_button_save_to_button").height
height: UM.Theme.getSize("action_button").height
width: height
tooltip: catalog.i18nc("@info:tooltip", "Change active post-processing scripts")
onClicked: dialog.show()

View File

@ -91,5 +91,10 @@ Column
target: toolbox
onInstallChanged: installed = toolbox.isInstalled(model.id)
onMetadataChanged: canUpdate = toolbox.canUpdate(model.id)
onFilterChanged:
{
installed = toolbox.isInstalled(model.id)
canUpdate = toolbox.canUpdate(model.id)
}
}
}

View File

@ -42,8 +42,8 @@ Item
{
id: externalLinkIcon
anchors.verticalCenter: manageQueueLabel.verticalCenter
color: UM.Theme.getColor("primary")
source: "../svg/icons/external_link.svg"
color: UM.Theme.getColor("text_link")
source: UM.Theme.getIcon("external_link")
width: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
height: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
}
@ -56,10 +56,11 @@ Item
leftMargin: 6 * screenScaleFactor // TODO: Theme!
verticalCenter: externalLinkIcon.verticalCenter
}
color: UM.Theme.getColor("primary")
color: UM.Theme.getColor("text_link")
font: UM.Theme.getFont("default") // 12pt, regular
linkColor: UM.Theme.getColor("primary")
linkColor: UM.Theme.getColor("text_link")
text: catalog.i18nc("@label link to connect manager", "Manage queue in Cura Connect")
renderType: Text.NativeRendering
}
}

View File

@ -32,6 +32,13 @@ Column
width: parent.width
height: childrenRect.height
PrintInformationWidget
{
id: printInformationPanel
visible: !preSlicedData
anchors.right: parent.right
}
Column
{
id: timeAndCostsInformation
@ -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

View File

@ -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
}
}
}
}

View File

@ -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.

View File

@ -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

View File

@ -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

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB