mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:48:59 +08:00
Fix Jobspecs text alignment
CURA-9010
This commit is contained in:
parent
90bb250d8f
commit
a9a0d4280a
@ -68,6 +68,14 @@ Item
|
|||||||
maximumLength: 120
|
maximumLength: 120
|
||||||
text: PrintInformation === null ? "" : PrintInformation.jobName
|
text: PrintInformation === null ? "" : PrintInformation.jobName
|
||||||
horizontalAlignment: TextInput.AlignLeft
|
horizontalAlignment: TextInput.AlignLeft
|
||||||
|
onTextChanged:
|
||||||
|
{
|
||||||
|
if (!activeFocus)
|
||||||
|
{
|
||||||
|
// Text is changed from outside, reset the cursor position.
|
||||||
|
cursorPosition = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
property string textBeforeEdit: ""
|
property string textBeforeEdit: ""
|
||||||
|
|
||||||
@ -86,12 +94,12 @@ Item
|
|||||||
PrintInformation.setJobName(new_name, true)
|
PrintInformation.setJobName(new_name, true)
|
||||||
}
|
}
|
||||||
printJobTextfield.focus = false
|
printJobTextfield.focus = false
|
||||||
|
cursorPosition = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
validator: RegExpValidator {
|
validator: RegExpValidator {
|
||||||
regExp: /^[^\\\/\*\?\|\[\]]*$/
|
regExp: /^[^\\\/\*\?\|\[\]]*$/
|
||||||
}
|
}
|
||||||
font: UM.Theme.getFont("default")
|
|
||||||
color: UM.Theme.getColor("text_scene")
|
color: UM.Theme.getColor("text_scene")
|
||||||
background: Item {}
|
background: Item {}
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user