Merge branch 'main' into CURA-9793_extend_recommended_print_settings

This commit is contained in:
Joey de l'Arago 2022-12-05 11:39:51 +01:00
commit 0738f996d0
409 changed files with 44013 additions and 3888 deletions

View file

@ -67,7 +67,7 @@ Item
UM.Label
{
id: textLabel
text: Cura.MachineManager.activeQualityDisplayNameMap["main"]
text: Cura.MachineManager.activeQualityDisplayNameMainStringParts.join(" - ")
Layout.margins: 0
Layout.maximumWidth: Math.floor(parent.width * 0.7) // Always leave >= 30% for the rest of the row.
height: contentHeight
@ -77,7 +77,19 @@ Item
UM.Label
{
text: activeQualityDetailText()
text:
{
const string_parts = Cura.MachineManager.activeQualityDisplayNameTailStringParts;
if (string_parts.length === 0)
{
return "";
}
else
{
` - ${string_parts.join(" - ")}`
}
}
color: UM.Theme.getColor("text_detail")
Layout.margins: 0
Layout.fillWidth: true
@ -85,32 +97,6 @@ Item
height: contentHeight
elide: Text.ElideRight
wrapMode: Text.NoWrap
function activeQualityDetailText()
{
var resultMap = Cura.MachineManager.activeQualityDisplayNameMap
var resultSuffix = resultMap["suffix"]
var result = ""
if (Cura.MachineManager.isActiveQualityExperimental)
{
resultSuffix += " (Experimental)"
}
if (Cura.MachineManager.isActiveQualitySupported)
{
if (Cura.MachineManager.activeQualityLayerHeight > 0)
{
if (resultSuffix)
{
result += " - " + resultSuffix
}
result += " - "
result += Cura.MachineManager.activeQualityLayerHeight + "mm"
}
}
return result
}
}
}

View file

@ -17,26 +17,8 @@ RowLayout
{
source: UM.Theme.getIcon("Sliders", "medium")
iconSize: UM.Theme.getSize("button_icon").width
text:
{
if (Cura.MachineManager.activeStack)
{
var resultMap = Cura.MachineManager.activeQualityDisplayNameMap
var text = resultMap["main"]
if (resultMap["suffix"])
{
text += " - " + resultMap["suffix"]
}
if (!Cura.MachineManager.hasNotSupportedQuality)
{
text += " - " + layerHeight.properties.value + "mm"
text += Cura.MachineManager.isActiveQualityExperimental ? " - " + catalog.i18nc("@label", "Experimental") : ""
}
return text
}
return ""
}
text: Cura.MachineManager.activeQualityDisplayNameStringParts.join(" - ")
font: UM.Theme.getFont("medium")
elide: Text.ElideMiddle
wrapMode: Text.NoWrap