Skip to content
Snippets Groups Projects
Commit c0cae37d authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.PropertyEditor: fixing color editing


Change-Id: I3102799952bace9c052f70f52489f5d768621f25
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent f06d1ae0
No related branches found
No related tags found
No related merge requests found
...@@ -66,8 +66,10 @@ Column { ...@@ -66,8 +66,10 @@ Column {
onColorChanged: { onColorChanged: {
textField.text = gradientLine.colorToString(color); textField.text = gradientLine.colorToString(color);
gradientLine.currentColor = color gradientLine.currentColor = color
//Delay setting the color to keep ui responsive
colorEditorTimer.restart() if (buttonRow.checkedIndex !== 1)
//Delay setting the color to keep ui responsive
colorEditorTimer.restart()
} }
GradientLine { GradientLine {
...@@ -105,10 +107,14 @@ Column { ...@@ -105,10 +107,14 @@ Column {
LineEdit { LineEdit {
id: textField id: textField
inputMask: "\\#hhHHHHHH" inputMask: "\\#HHHHHHhh"
backendValue: colorEditor.backendendValue
onAccepted: { onAccepted: {
colorEditor.color = text print("color")
print(textField.text)
colorEditor.color = textField.text
} }
Layout.preferredWidth: 80 Layout.preferredWidth: 80
} }
...@@ -124,26 +130,25 @@ Column { ...@@ -124,26 +130,25 @@ Column {
ButtonRowButton { ButtonRowButton {
iconSource: "images/icon_color_solid.png" iconSource: "images/icon_color_solid.png"
onClicked: {
colorEditor.backendendValue.resetValue();
}
} }
ButtonRowButton { ButtonRowButton {
visible: supportGradient visible: supportGradient
iconSource: "images/icon_color_gradient.png" iconSource: "images/icon_color_gradient.png"
onClicked: {
print("gradient")
}
} }
ButtonRowButton { ButtonRowButton {
iconSource: "images/icon_color_none.png" iconSource: "images/icon_color_none.png"
onClicked: {
}
onToggled: {
if (index === 0) {
colorEditor.color = "#ffffff"
}
if (index === 2) {
colorEditor.color = "#00000000" colorEditor.color = "#00000000"
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment