Align the print info to the left

This commit is contained in:
Diego Prado Gesto 2018-12-05 14:22:04 +01:00
parent a2587aca59
commit 218fa3aded
2 changed files with 71 additions and 81 deletions

View File

@ -189,16 +189,6 @@ UM.MainWindow
onHideTooltip: base.hideTooltip() onHideTooltip: base.hideTooltip()
} }
JobSpecs
{
id: jobSpecs
anchors
{
bottom: parent.bottom
bottomMargin: UM.Theme.getSize("default_margin").height
}
}
Toolbar Toolbar
{ {
// The toolbar is the left bar that is populated by all the tools (which are dynamicly populated by // The toolbar is the left bar that is populated by all the tools (which are dynamicly populated by
@ -228,6 +218,19 @@ UM.MainWindow
} }
} }
JobSpecs
{
id: jobSpecs
visible: CuraApplication.platformActivity
anchors
{
left: parent.left
bottom: viewOrientationControls.top
margins: UM.Theme.getSize("wide_margin").width
bottomMargin: UM.Theme.getSize("default_margin").width
}
}
ViewOrientationControls ViewOrientationControls
{ {
id: viewOrientationControls id: viewOrientationControls
@ -235,9 +238,8 @@ UM.MainWindow
anchors anchors
{ {
left: parent.left left: parent.left
margins: UM.Theme.getSize("default_margin").width
bottom: parent.bottom bottom: parent.bottom
margins: UM.Theme.getSize("wide_margin").width
} }
} }

View File

@ -22,6 +22,7 @@ Item
name: "cura" name: "cura"
} }
width: childrenRect.width
height: childrenRect.height height: childrenRect.height
onActivityChanged: onActivityChanged:
@ -33,23 +34,17 @@ Item
} }
} }
Rectangle Item
{ {
id: jobNameRow id: jobNameRow
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.left: parent.left
height: UM.Theme.getSize("jobspecs_line").height height: UM.Theme.getSize("jobspecs_line").height
visible: base.activity
Item
{
width: parent.width
height: parent.height
Button Button
{ {
id: printJobPencilIcon id: printJobPencilIcon
anchors.right: parent.right anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: UM.Theme.getSize("save_button_specs_icons").width width: UM.Theme.getSize("save_button_specs_icons").width
height: UM.Theme.getSize("save_button_specs_icons").height height: UM.Theme.getSize("save_button_specs_icons").height
@ -80,14 +75,14 @@ Item
TextField TextField
{ {
id: printJobTextfield id: printJobTextfield
anchors.right: printJobPencilIcon.left anchors.left: printJobPencilIcon.right
anchors.rightMargin: UM.Theme.getSize("narrow_margin").width anchors.leftMargin: UM.Theme.getSize("narrow_margin").width
height: UM.Theme.getSize("jobspecs_line").height height: UM.Theme.getSize("jobspecs_line").height
width: Math.max(__contentWidth + UM.Theme.getSize("default_margin").width, 50) width: Math.max(__contentWidth + UM.Theme.getSize("default_margin").width, 50)
maximumLength: 120 maximumLength: 120
property int unremovableSpacing: 5 property int unremovableSpacing: 5
text: PrintInformation.jobName text: PrintInformation.jobName
horizontalAlignment: TextInput.AlignRight horizontalAlignment: TextInput.AlignLeft
onEditingFinished: onEditingFinished:
{ {
@ -112,28 +107,21 @@ Item
} }
} }
} }
}
Row Row
{ {
id: additionalComponentsRow id: additionalComponentsRow
anchors.top: jobNameRow.bottom anchors.top: jobNameRow.bottom
anchors.right: parent.right anchors.left: parent.left
} }
Label Label
{ {
id: boundingSpec id: boundingSpec
anchors.top: jobNameRow.bottom anchors.top: jobNameRow.bottom
anchors.right: additionalComponentsRow.left anchors.left: additionalComponentsRow.right
anchors.rightMargin: anchors.leftMargin: additionalComponentsRow.width > 0 ? UM.Theme.getSize("default_margin").width : 0
{
if (additionalComponentsRow.width > 0)
{
return UM.Theme.getSize("default_margin").width
}
return 0
}
height: UM.Theme.getSize("jobspecs_line").height height: UM.Theme.getSize("jobspecs_line").height
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default_bold") font: UM.Theme.getFont("default_bold")