summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-07-06 03:38:23 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-07-06 03:38:23 (GMT)
commitb43f46fdc4fede579b512624c03df5c19893288a (patch)
tree284846a77e6441b03b3905671658085f73b7b61f /src/declarative
parent3384a5bedabbbb406026b31ecfa4266ac3205bcc (diff)
parent5500ffeeaee3412272f0f4af844fbc1d4d78a3bb (diff)
downloadQt-b43f46fdc4fede579b512624c03df5c19893288a.zip
Qt-b43f46fdc4fede579b512624c03df5c19893288a.tar.gz
Qt-b43f46fdc4fede579b512624c03df5c19893288a.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index c066f11..5b4d80b 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -1263,6 +1263,15 @@ void QDeclarativeTextEditPrivate::init()
control = new QTextControl(q);
control->setIgnoreUnusedNavigationEvents(true);
+ // QTextControl follows the default text color
+ // defined by the platform, declarative text
+ // should be black by default
+ QPalette pal = control->palette();
+ if (pal.color(QPalette::Text) != color) {
+ pal.setColor(QPalette::Text, color);
+ control->setPalette(pal);
+ }
+
QObject::connect(control, SIGNAL(updateRequest(QRectF)), q, SLOT(updateImgCache(QRectF)));
QObject::connect(control, SIGNAL(textChanged()), q, SLOT(q_textChanged()));