aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2014-04-14 12:11:51 +0200
committerMarco Bubke <marco.bubke@digia.com>2014-04-14 12:52:43 +0200
commit929f12eefc65fbf24e9bbb724ed516b154312d3c (patch)
treeae96616c7912dc77e1f69aa57f61db04a629be14 /share
parent58fec681958c86ebd65a6a27f9605f6a6a1d4247 (diff)
QmlDesigner.PropertyEditor: Fixing colouring for FontComboBox
Task-number: QTCREATORBUG-12027 Change-Id: Ic5ad0e16a7d60dacc89fa4c226e30a40a45be9db Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml23
1 files changed, 18 insertions, 5 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml
index 9c15b039b3..413fe2a9e3 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml
@@ -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
+ }
+ }
+ }
}