diff options
Diffstat (limited to 'share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml')
-rw-r--r-- | share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml index b88248865f..889b2ce16c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml @@ -64,6 +64,8 @@ Column { id: colorEditor onColorChanged: { + if (!gradientLine.isCompleted) + return; textField.text = gradientLine.colorToString(color); if (supportGradient && gradientLine.visible) @@ -75,6 +77,7 @@ Column { } GradientLine { + property bool isCompleted: false visible: buttonRow.checkedIndex === 1 id: gradientLine @@ -86,6 +89,7 @@ Column { } onHasGradientChanged: { + print("hasGradient") if (!supportGradient) return @@ -95,6 +99,11 @@ Column { buttonRow.initalChecked = 0 buttonRow.checkedIndex = buttonRow.initalChecked } + + Component.onCompleted: { + colorEditor.color = gradientLine.currentColor + isCompleted= true + } } SectionLayout { |