Commit 929f12ee authored by Thomas Hartmann's avatar Thomas Hartmann Committed by Marco Bubke

QmlDesigner.PropertyEditor: Fixing colouring for FontComboBox

Task-number: QTCREATORBUG-12027
Change-Id: Ic5ad0e16a7d60dacc89fa4c226e30a40a45be9db
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 58fec681
......@@ -47,7 +47,9 @@ Controls.ComboBox {
id: comboBox
property variant backendValue
property color textColor: "white"
property color textColor: colorLogic.textColor
onTextColorChanged: setColor()
editable: true
model: ["Arial", "Times New Roman", "Courier", "Verdana", "Tahoma"]
......@@ -60,9 +62,13 @@ Controls.ComboBox {
textColor: comboBox.textColor
}
property string textValue: backendValue.value
onTextValueChanged: {
comboBox.editText = textValue
ColorLogic {
id: colorLogic
backendValue: comboBox.backendValue
property string textValue: backendValue.value
onTextValueChanged: {
comboBox.editText = textValue
}
}
Layout.fillWidth: true
......@@ -85,7 +91,6 @@ Controls.ComboBox {
Component.onCompleted: {
//Hack to style the text input
for (var i = 0; i < comboBox.children.length; i++) {
print(comboBox.children[i])
if (comboBox.children[i].text !== undefined) {
comboBox.children[i].color = comboBox.textColor
comboBox.children[i].anchors.rightMargin = 34
......@@ -93,5 +98,13 @@ Controls.ComboBox {
}
}
}
function setColor() {
//Hack to style the text input
for (var i = 0; i < comboBox.children.length; i++) {
if (comboBox.children[i].text !== undefined) {
comboBox.children[i].color = comboBox.textColor
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment