diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-30 13:03:14 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-30 13:03:14 (GMT) |
commit | 429b747d492ef038c2ed58a9a72060d951721252 (patch) | |
tree | 2c96e795e4f3ea8aa7eddc6306fba903ef4019fa /src/gui/text/qstatictext.cpp | |
parent | 853894dca607a0266f3c6d23c937dd5f55e551af (diff) | |
parent | b73fa21a343e0e8f6a7c2cb1d07eaff644481c44 (diff) | |
download | Qt-429b747d492ef038c2ed58a9a72060d951721252.zip Qt-429b747d492ef038c2ed58a9a72060d951721252.tar.gz Qt-429b747d492ef038c2ed58a9a72060d951721252.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/gui/text/qstatictext.cpp')
-rw-r--r-- | src/gui/text/qstatictext.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index 45252d8..5f31ef0 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -584,6 +584,11 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p) textLayout.draw(p, topLeftPosition); } else { QTextDocument document; + QColor color = p->pen().color(); + document.setDefaultStyleSheet(QString::fromLatin1("body { color: #%1%2%3 }") + .arg(QString::number(color.red(), 16), 2, QLatin1Char('0')) + .arg(QString::number(color.green(), 16), 2, QLatin1Char('0')) + .arg(QString::number(color.blue(), 16), 2, QLatin1Char('0'))); document.setDefaultFont(font); document.setDocumentMargin(0.0); if (textWidth >= 0.0) |