<table><tr><td style="">dhaumann added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D21295">View Revision</a></tr></table><br /><div><div><p>Well, this change only affects the SyntaxHighlighter, which KTextEditor does not use ;)</p>
<p>For completeness: <a href="https://code.woboq.org/qt5/qtbase/src/gui/text/qtextdocument.cpp.html#673" class="remarkup-link" target="_blank" rel="noreferrer">https://code.woboq.org/qt5/qtbase/src/gui/text/qtextdocument.cpp.html#673</a><br />
Here, we can see that QTextDocument::drawContents() internally uses a QAbstractTextDocumentLayout::PaintContext ctx, which itself provides a default-constructed QPalette. A defaut-constructed QPalette equals the application palette. So the only other way for the text thumbnailer is to temporarily set the QApplication palette.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D21295">https://phabricator.kde.org/D21295</a></div></div><br /><div><strong>To: </strong>dhaumann, vkrause, cullmann, kossebau<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>