mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 18:55:59 +08:00
Align the print info to the left
This commit is contained in:
parent
a2587aca59
commit
218fa3aded
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,9 +19,10 @@ Item
|
|||||||
UM.I18nCatalog
|
UM.I18nCatalog
|
||||||
{
|
{
|
||||||
id: catalog
|
id: catalog
|
||||||
name:"cura"
|
name: "cura"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
width: childrenRect.width
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
onActivityChanged:
|
onActivityChanged:
|
||||||
@ -33,82 +34,75 @@ 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
|
Button
|
||||||
{
|
{
|
||||||
width: parent.width
|
id: printJobPencilIcon
|
||||||
height: parent.height
|
anchors.left: parent.left
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
width: UM.Theme.getSize("save_button_specs_icons").width
|
||||||
|
height: UM.Theme.getSize("save_button_specs_icons").height
|
||||||
|
|
||||||
Button
|
onClicked:
|
||||||
{
|
{
|
||||||
id: printJobPencilIcon
|
printJobTextfield.selectAll()
|
||||||
anchors.right: parent.right
|
printJobTextfield.focus = true
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
}
|
||||||
width: UM.Theme.getSize("save_button_specs_icons").width
|
|
||||||
height: UM.Theme.getSize("save_button_specs_icons").height
|
|
||||||
|
|
||||||
onClicked:
|
style: ButtonStyle
|
||||||
|
{
|
||||||
|
background: Item
|
||||||
{
|
{
|
||||||
printJobTextfield.selectAll()
|
UM.RecolorImage
|
||||||
printJobTextfield.focus = true
|
|
||||||
}
|
|
||||||
|
|
||||||
style: ButtonStyle
|
|
||||||
{
|
|
||||||
background: Item
|
|
||||||
{
|
{
|
||||||
UM.RecolorImage
|
width: UM.Theme.getSize("save_button_specs_icons").width
|
||||||
{
|
height: UM.Theme.getSize("save_button_specs_icons").height
|
||||||
width: UM.Theme.getSize("save_button_specs_icons").width
|
sourceSize.width: width
|
||||||
height: UM.Theme.getSize("save_button_specs_icons").height
|
sourceSize.height: width
|
||||||
sourceSize.width: width
|
color: control.hovered ? UM.Theme.getColor("text_scene_hover") : UM.Theme.getColor("text_scene")
|
||||||
sourceSize.height: width
|
source: UM.Theme.getIcon("pencil")
|
||||||
color: control.hovered ? UM.Theme.getColor("text_scene_hover") : UM.Theme.getColor("text_scene")
|
|
||||||
source: UM.Theme.getIcon("pencil")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TextField
|
TextField
|
||||||
|
{
|
||||||
|
id: printJobTextfield
|
||||||
|
anchors.left: printJobPencilIcon.right
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("narrow_margin").width
|
||||||
|
height: UM.Theme.getSize("jobspecs_line").height
|
||||||
|
width: Math.max(__contentWidth + UM.Theme.getSize("default_margin").width, 50)
|
||||||
|
maximumLength: 120
|
||||||
|
property int unremovableSpacing: 5
|
||||||
|
text: PrintInformation.jobName
|
||||||
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
|
|
||||||
|
onEditingFinished:
|
||||||
{
|
{
|
||||||
id: printJobTextfield
|
var new_name = text == "" ? catalog.i18nc("@text Print job name", "Untitled") : text
|
||||||
anchors.right: printJobPencilIcon.left
|
PrintInformation.setJobName(new_name, true)
|
||||||
anchors.rightMargin: UM.Theme.getSize("narrow_margin").width
|
printJobTextfield.focus = false
|
||||||
height: UM.Theme.getSize("jobspecs_line").height
|
}
|
||||||
width: Math.max(__contentWidth + UM.Theme.getSize("default_margin").width, 50)
|
|
||||||
maximumLength: 120
|
|
||||||
property int unremovableSpacing: 5
|
|
||||||
text: PrintInformation.jobName
|
|
||||||
horizontalAlignment: TextInput.AlignRight
|
|
||||||
|
|
||||||
onEditingFinished:
|
validator: RegExpValidator {
|
||||||
|
regExp: /^[^\\\/\*\?\|\[\]]*$/
|
||||||
|
}
|
||||||
|
|
||||||
|
style: TextFieldStyle
|
||||||
|
{
|
||||||
|
textColor: UM.Theme.getColor("text_scene")
|
||||||
|
font: UM.Theme.getFont("default_bold")
|
||||||
|
background: Rectangle
|
||||||
{
|
{
|
||||||
var new_name = text == "" ? catalog.i18nc("@text Print job name", "Untitled") : text
|
opacity: 0
|
||||||
PrintInformation.setJobName(new_name, true)
|
border.width: 0
|
||||||
printJobTextfield.focus = false
|
|
||||||
}
|
|
||||||
|
|
||||||
validator: RegExpValidator {
|
|
||||||
regExp: /^[^\\\/\*\?\|\[\]]*$/
|
|
||||||
}
|
|
||||||
|
|
||||||
style: TextFieldStyle
|
|
||||||
{
|
|
||||||
textColor: UM.Theme.getColor("text_scene")
|
|
||||||
font: UM.Theme.getFont("default_bold")
|
|
||||||
background: Rectangle
|
|
||||||
{
|
|
||||||
opacity: 0
|
|
||||||
border.width: 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -118,22 +112,16 @@ Item
|
|||||||
{
|
{
|
||||||
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")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user