D21295: SyntaxHighlighter: Fix foreground color for text without special highlighting

Dominik Haumann noreply at phabricator.kde.org
Sun May 19 20:59:49 BST 2019

dhaumann added a comment.

  Well, this change only affects the SyntaxHighlighter, which KTextEditor does not use ;)
  For completeness: https://code.woboq.org/qt5/qtbase/src/gui/text/qtextdocument.cpp.html#673
  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.

  R216 Syntax Highlighting


To: dhaumann, vkrause, cullmann, kossebau
Cc: kwrite-devel, kde-frameworks-devel, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190519/c7d7e76e/attachment.html>

More information about the KWrite-Devel mailing list