Hello,

I found a bug in Plasma::TextEdit when using Microblogging plasmoid and it
suddenly turned out that  its root is in Qt's QTextEdit code in method
toHtml(). The bug is that if one enter some text to TextEdit, cut/copy it
and paste it back, the text is rendered on black background and is almost
invisible.

The problem appears because Plasma::TextEdit sets textBackgroundColor
property of it's internal KTextEdit to Qt::transparent which in turn sets
this property to QTextEdit. But inside QTextEdit::toHtml() method code the
alpha transparency part of textBackgroundColor is somehow completely ignored
and only color part is used (#000000 i.e. black color). So, the result HTML
code from toHtml() call is like this (I formatted it a little to make more
readable):

"<!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:'DejaVu Sans'; font-size:9pt; 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;">
<span style=" background-color:#000000;">this is test text</span>
</p>
</body>
</html>

There's no 'opacity' style option so background is opaque and black. I filed
a bug report to Qt here: http://bugreports.qt.nokia.com//browse/QTBUG-21522

Could someone help to make the report won't be ignored as it affects Plasma
user experience significantly and IMO can be fixed quite easily?
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to