mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
802e0b14b2
1 changed files with 13 additions and 2 deletions
|
@ -24,7 +24,7 @@ Rectangle {
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
|
|
||||||
property variant printDuration: PrintInformation.currentPrintTime
|
property variant printDuration: PrintInformation.currentPrintTime
|
||||||
property real printMaterialAmount: PrintInformation.materialAmounts[0]
|
property variant printMaterialAmounts: PrintInformation.materialAmounts
|
||||||
|
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
@ -192,7 +192,18 @@ Rectangle {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
font: UM.Theme.getFont("small")
|
font: UM.Theme.getFont("small")
|
||||||
color: UM.Theme.getColor("text_subtext")
|
color: UM.Theme.getColor("text_subtext")
|
||||||
text: catalog.i18nc("@label", "%1 m").arg(base.printMaterialAmount > 0 ? base.printMaterialAmount : 0)
|
text:
|
||||||
|
{
|
||||||
|
var amounts = [];
|
||||||
|
if(base.printMaterialAmounts) {
|
||||||
|
for(var index = 0; index < base.printMaterialAmounts.length; index++) {
|
||||||
|
amounts.push(base.printMaterialAmounts[index].toFixed(2));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
amounts = ["0.00"];
|
||||||
|
}
|
||||||
|
return catalog.i18nc("@label", "%1 m").arg(amounts.join(" + "));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue