Merge branch 'master' of github.com:Ultimaker/Cura into replace_controls_1_for_controls_2

This commit is contained in:
Jaime van Kessel 2022-01-03 15:32:58 +01:00
commit f11d728c6b
838 changed files with 99530 additions and 92324 deletions

View file

@ -50,10 +50,16 @@ Cura.ExpandablePopup
model: extrudersModel
delegate: Item
{
id: extruderItem
Layout.preferredWidth: Math.round(parent.width / extrudersModel.count)
Layout.maximumWidth: Math.round(parent.width / extrudersModel.count)
Layout.fillHeight: true
property var extruderStack: Cura.MachineManager.activeMachine.extruders[model.index]
property bool valueWarning: !Cura.ExtruderManager.getExtruderHasQualityForMaterial(extruderStack)
property bool valueError: Cura.ContainerManager.getContainerMetaDataEntry(extruderStack.material.id, "compatible", "") != "True"
// Extruder icon. Shows extruder index and has the same color as the active material.
Cura.ExtruderIcon
{
@ -63,6 +69,113 @@ Cura.ExpandablePopup
anchors.verticalCenter: parent.verticalCenter
}
MouseArea // Connection status tooltip hover area
{
id: tooltipHoverArea
anchors.fill: parent
hoverEnabled: tooltip.text != ""
acceptedButtons: Qt.NoButton // react to hover only, don't steal clicks
onEntered:
{
base.mouseArea.entered() // we want both this and the outer area to be entered
tooltip.show()
}
onExited: { tooltip.hide() }
}
Cura.ToolTip
{
id: tooltip
x: 0
y: parent.height + UM.Theme.getSize("default_margin").height
width: UM.Theme.getSize("tooltip").width
targetPoint: Qt.point(Math.round(extruderIcon.width / 2), 0)
text:
{
if (!model.enabled)
{
return ""
}
if (extruderItem.valueError)
{
return catalog.i18nc("@tooltip", "The configuration of this extruder is not allowed, and prohibits slicing.")
}
if (extruderItem.valueWarning)
{
return catalog.i18nc("@tooltip", "There are no profiles matching the configuration of this extruder.")
}
return ""
}
}
// Warning icon that indicates if no qualities are available for the variant/material combination for this extruder
UM.RecolorImage
{
id: badge
anchors
{
top: parent.top
topMargin: - Math.round(height * 1 / 6)
left: parent.left
leftMargin: extruderIcon.width - Math.round(width * 5 / 6)
}
width: UM.Theme.getSize("icon_indicator").width
height: UM.Theme.getSize("icon_indicator").height
visible: model.enabled && (extruderItem.valueError || extruderItem.valueWarning)
source:
{
if (extruderItem.valueError)
{
return UM.Theme.getIcon("ErrorBadge", "low")
}
if (extruderItem.valueWarning)
{
return UM.Theme.getIcon("WarningBadge", "low")
}
return ""
}
color:
{
if (extruderItem.valueError)
{
return UM.Theme.getColor("error")
}
if (extruderItem.valueWarning)
{
return UM.Theme.getColor("warning")
}
return "transparent"
}
// Make a themable circle in the background so we can change it in other themes
Rectangle
{
id: iconBackground
anchors.centerIn: parent
width: parent.width - 1.5 //1.5 pixels smaller, (at least sqrt(2), regardless of screen pixel scale) so that the circle doesn't show up behind the icon due to anti-aliasing.
height: parent.height - 1.5
radius: width / 2
z: parent.z - 1
color:
{
if (extruderItem.valueError)
{
return UM.Theme.getColor("error_badge_background")
}
if (extruderItem.valueWarning)
{
return UM.Theme.getColor("warning_badge_background")
}
return "transparent"
}
}
}
Column
{
opacity: model.enabled ? 1 : UM.Theme.getColor("extruder_disabled").a

View file

@ -82,7 +82,7 @@ Button
right: parent.right
rightMargin: 0
}
width: childrenRect.width
width: contentItem.width
height: parent.height
padding: 0
leftPadding: UM.Theme.getSize("thin_margin").width

View file

@ -571,7 +571,7 @@ Window
}
UM.Label
{
text: catalog.i18nc("@text", "It seems like you don't have access to any printers connected to Digital Factory.")
text: catalog.i18nc("@text", "It seems like you don't have any compatible printers connected to Digital Factory. Make sure your printer is connected and it's running the latest firmware.")
width: parent.width
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.Wrap
@ -680,7 +680,7 @@ Window
{
text: catalog.i18nc("@button", "How to load new material profiles to my printer")
iconSource: UM.Theme.getIcon("LinkExternal")
onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360013137919?utm_source=cura&utm_medium=software&utm_campaign=sync-material-wizard-how-usb")
onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/4403319801106/?utm_source=cura&utm_medium=software&utm_campaign=add-material-profiles-via-usb")
}
Item
@ -726,6 +726,7 @@ Window
id: cloudPrinterList
filterConnectionType: 3 //Only show cloud connections.
filterOnlineOnly: true //Only show printers that are online.
filterCapabilities: ["import_material"] //Only show printers that can receive the material profiles.
}
Cura.GlobalStacksModel
{