mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
parent
8847325cf8
commit
0d0bcb8aea
1 changed files with 2 additions and 0 deletions
|
@ -108,6 +108,7 @@ SettingItem
|
|||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
renderType: Text.NativeRendering
|
||||
|
@ -155,6 +156,7 @@ SettingItem
|
|||
selectByMouse: true;
|
||||
|
||||
maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10;
|
||||
clip: true; //Hide any text that exceeds the width of the text box.
|
||||
|
||||
validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue