mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-30 14:21:19 -07:00
Always prefix text in ColorDialog with a hashtag
CURA 8687
This commit is contained in:
parent
959caece90
commit
ca0d84dcae
1 changed files with 7 additions and 1 deletions
|
|
@ -41,7 +41,13 @@ UM.Dialog
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
anchors.top: colorLabel.bottom
|
anchors.top: colorLabel.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
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
|
Rectangle
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue