mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Add sensible maximum length to machine name and job name entry
This commit is contained in:
parent
90fda4cb3d
commit
bc24a3c95b
2 changed files with 5 additions and 4 deletions
|
@ -25,7 +25,6 @@ Rectangle {
|
||||||
property variant printDuration: PrintInformation.currentPrintTime;
|
property variant printDuration: PrintInformation.currentPrintTime;
|
||||||
property real printMaterialAmount: PrintInformation.materialAmount;
|
property real printMaterialAmount: PrintInformation.materialAmount;
|
||||||
|
|
||||||
width: UM.Theme.getSize("jobspecs").width
|
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
|
@ -125,13 +124,14 @@ Rectangle {
|
||||||
anchors.right: printJobPencilIcon.left
|
anchors.right: printJobPencilIcon.left
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width/2
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width/2
|
||||||
height: UM.Theme.getSize("jobspecs_line").height
|
height: UM.Theme.getSize("jobspecs_line").height
|
||||||
width: base.width
|
width: __contentWidth + UM.Theme.getSize("default_margin").width
|
||||||
|
maximumLength: 120
|
||||||
property int unremovableSpacing: 5
|
property int unremovableSpacing: 5
|
||||||
text: ''
|
text: ''
|
||||||
horizontalAlignment: TextInput.AlignRight
|
horizontalAlignment: TextInput.AlignRight
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if(text != ''){
|
if(text != ''){
|
||||||
//this prevent that is sets an empty string as jobname
|
//Prevent that jobname is set to an empty string
|
||||||
Printer.setJobName(text)
|
Printer.setJobName(text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,6 +212,7 @@ Item
|
||||||
id: machineName;
|
id: machineName;
|
||||||
text: getMachineName()
|
text: getMachineName()
|
||||||
implicitWidth: UM.Theme.getSize("standard_list_input").width
|
implicitWidth: UM.Theme.getSize("standard_list_input").width
|
||||||
|
maximumLength: 120
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue