summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml12
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml5
2 files changed, 16 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml
index aa4b76edfe..6fe7636fad 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml
@@ -50,6 +50,10 @@ Column {
property alias gradientPropertyName: gradientLine.gradientPropertyName
+ function isNotInGradientMode() {
+ return (buttonRow.checkedIndex !== 1)
+ }
+
onValueChanged: {
colorEditor.color = colorEditor.value
}
@@ -78,7 +82,7 @@ Column {
gradientLine.currentColor = color
}
- if (buttonRow.checkedIndex !== 1) {
+ if (isNotInGradientMode()) {
//Delay setting the color to keep ui responsive
colorEditorTimer.restart()
}
@@ -170,6 +174,12 @@ Column {
colorEditor.color = colorFromString(textField.text)
}
+ onCommitData: {
+ colorEditor.color = colorFromString(textField.text)
+ if (isNotInGradientMode())
+ backendendValue.value = colorEditor.color
+ }
+
Layout.fillWidth: true
}
ColorCheckButton {
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml
index 9cea91a9e5..1f5dd2aad7 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml
@@ -53,6 +53,8 @@ Controls.TextField {
property bool showExtendedFunctionButton: true
+ signal commitData
+
ExtendedFunctionButton {
x: 2
y: 4
@@ -82,7 +84,10 @@ Controls.TextField {
onSelectionToBeChanged: {
if (__dirty && !writeValueManually) {
lineEdit.backendValue.value = text
+ } else if (__dirty) {
+ commitData()
}
+
__dirty = false
}
}