https://bugs.kde.org/show_bug.cgi?id=409380

            Bug ID: 409380
           Summary: Formatting by KSyntaxHighlighting::SyntaxHighlighter
                    of normal text seems to be dropped partially (Qt
                    >=5.13.0/5.12.4)
           Product: frameworks-syntax-highlighting
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: theme
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: kosse...@kde.org
  Target Milestone: ---

So when we thought bug 406821 (Dark UI color theme breaks default LightTheme)
was fixed, seems newer Qt fights back somehow and screws up things in some
yet-to-be-understood way (given I could not see any code change on KDE side).

I am a bit puzzled as I had tested the patch applied as
bbc465981bd55ca5449f5d22e972fccbe994e24f to syntax-highlighting to fix this bug
and remember that I very well could confirm the behaviour to have been fixed.

But now that I run latest KF 5.59 and Qt 5.13.0, I see that the bug symptom
seems to have reappeared somehow.

When I add "qDebug() << textDocument.toHtml();" to the textthumbnailer, the
exported HTML does not contain any explicit foreground/text markup, here e.g.
for a .txt file with the content "This is some example text."
--- 8< ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd";>
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Droid Sans'; font-size:9px;
font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;">This is some example
text.</p></body></html>
--- 8< ---
and as result the text color seems to be rendered again depending on the
current UI palette color if drawing with a QPainter on a pixmap, like in the
thumbnailer
(https://cgit.kde.org/kio-extras.git/tree/thumbnail/textcreator.cpp)

Strange enough, when doing the same for printing (like with the
https://cgit.kde.org/syntax-highlighting.git/tree/examples/codepdfprinter/codepdfprinter.cpp),
we get black text in the PDF, despite the same UI color theme.

Sadly I do not remember exactly what it was before, but if asked before I would
have said there was more explicit formatting in the generated HTML, and thus
printing and pixmap rendering yield the same colors used. Not sure now.

Will see to do some closer look later this week.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to