CURA-4557 it's now a small button next to the job spec when one of the warping materials is selected

This commit is contained in:
Jack Ha 2018-03-21 16:55:58 +01:00
parent 25bf7a6aba
commit d8d226c0d6
6 changed files with 190 additions and 57 deletions

View file

@ -124,15 +124,50 @@ Item {
}
}
Row {
id: additionalComponentsRow
anchors.top: jobNameRow.bottom
anchors.right: parent.right
}
Label
{
id: boundingSpec
anchors.top: jobNameRow.bottom
anchors.right: parent.right
anchors.right: additionalComponentsRow.left
anchors.rightMargin:
{
if (additionalComponentsRow.width > 0)
{
return UM.Theme.getSize("default_margin").width
}
else
{
return 0;
}
}
height: UM.Theme.getSize("jobspecs_line").height
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("small")
color: UM.Theme.getColor("text_scene")
text: CuraApplication.getSceneBoundingBoxString
}
Component.onCompleted: {
base.addAdditionalComponents("jobSpecsButton")
}
Connections {
target: CuraApplication
onAdditionalComponentsChanged: base.addAdditionalComponents("jobSpecsButton")
}
function addAdditionalComponents (areaId) {
if(areaId == "jobSpecsButton") {
for (var component in CuraApplication.additionalComponents["jobSpecsButton"]) {
CuraApplication.additionalComponents["jobSpecsButton"][component].parent = additionalComponentsRow
}
}
}
}