diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index f432b7e..a7f619e 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2219,8 +2219,12 @@ void QTextLine::draw(QPainter *p, const QPointF &pos, const QTextLayout::FormatR QTextCharFormat format; if (eng->hasFormats() || selection) { - if (!suppressColors) - format = eng->format(&si); + format = eng->format(&si); + if (suppressColors) { + format.clearForeground(); + format.clearBackground(); + format.clearProperty(QTextFormat::TextUnderlineColor); + } if (selection) format.merge(selection->format); |