mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:18:58 +08:00
Always prefix text in ColorDialog with a hashtag
CURA 8687
This commit is contained in:
parent
959caece90
commit
ca0d84dcae
@ -41,7 +41,13 @@ UM.Dialog
|
||||
selectByMouse: true
|
||||
anchors.top: colorLabel.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
validator: RegExpValidator { regExp: /^#([a-fA-F0-9]{6})$/ }
|
||||
onTextChanged: {
|
||||
if (!text.startsWith("#"))
|
||||
{
|
||||
text = `#${text}`;
|
||||
}
|
||||
}
|
||||
validator: RegExpValidator { regExp: /^#([a-fA-F0-9]{0,6})$/ }
|
||||
}
|
||||
|
||||
Rectangle
|
||||
|
Loading…
x
Reference in New Issue
Block a user