forked from qt-creator/qt-creator
PropertyEditor.QmlDesigner: Fix the color LineEdit
Using hasToConvertColor to handle the alpha channel. Change-Id: I6b6e2ef4361efb7aba3adaf549cbddd625145e33 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -68,7 +68,6 @@ Column {
|
||||
onColorChanged: {
|
||||
if (!gradientLine.isCompleted)
|
||||
return;
|
||||
textField.text = gradientLine.colorToString(color);
|
||||
|
||||
if (supportGradient && gradientLine.visible)
|
||||
gradientLine.currentColor = color
|
||||
@@ -132,6 +131,8 @@ Column {
|
||||
LineEdit {
|
||||
id: textField
|
||||
|
||||
hasToConvertColor: true
|
||||
|
||||
validator: RegExpValidator {
|
||||
regExp: /#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?/g
|
||||
}
|
||||
@@ -141,8 +142,9 @@ Column {
|
||||
backendValue: colorEditor.backendendValue
|
||||
|
||||
onAccepted: {
|
||||
colorEditor.color = textField.text
|
||||
colorEditor.color = colorFromString(textField.text)
|
||||
}
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
ColorCheckButton {
|
||||
|
||||
Reference in New Issue
Block a user