Attention everyone,

This could affect a range of KDE apps and libraries in various ways.

Bug 332335 - "Links fade to pitch black when mouse hovering over them"
https://bugs.kde.org/show_bug.cgi?id=332335

reports a nasty painting problem that was found when hovering over a
Plasma ToolButton in KDevelop on the Apple OS X platform.
Screenshot: http://bugsfiles.kde.org/attachment.cgi?id=85991

I also discovered the problem in the KBounce game, reported it [1] and, being a
KDE Games programmer, investigated it and found the cause.  See also [2], which
might relate to this.

I think the cause is to do with using QPainter::CompositionMode_DestinationIn to
"blend in" an opaque pixmap and make it look semi-transparent on top of the main
picture.  KBounce creates an opaque message-box pixmap of a color that matches
the graphics theme, attempts to make it semi-transparent, then writes black (or 
dark
color) text on it.  But on Apple OS X the box comes out black, making the text 
invisible
and the game unplayable for most people.

If I comment out the CompositionMode references, the messages appear OK, but
on an opaque message-box.  I can fix the problem completely by using
QPainter::setOpacity() to make the box semi-transparent, instead of 
CompositionMode.

It seems that the problem with Plasma ToolButton (see above) has the same cause.

Code references to Plasma::ToolButton::paint() and 
KBounceGameWidget::generateOverlay():
http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/toolbutton_8cpp_source.html#l00329https://projects.kde.org/projects/kde/kdegames/kbounce/repository/revisions/master/entry/gamewidget.cpp
 lines 390 to 398

But THAT IS NOT ALL … To see if there were other possible occurrences of 
black-on-black
problems in KDE on Apple OS X, I went into LXR and here is what I found … 

    http://lxr.kde.org/ident?_i=CompositionMode_DestinationIn&_remember=1

which shows 146 INSTANCES of using CompositionMode_DestinationIn, across
a broad range of KDE applications and libraries …

Amongst the KDE Games references, KFourInLine seems to work OK on Apple OS X, 
but
KPat definitely has some transient black-on-black glitches when animating 
highlights.
The KPat code also includes the following interesting comment:

0166                 // Using QPainter::setOpacity is currently very 
inefficient, so to
0167                 // paint a semitransparent pixmap, we have to do some 
fiddling.

Is QPainter::setOpacity more efficient now?

I do not have the time or the ability to investigate all the references on my 
own
and I have some more urgent KDE portability problems to chase up [3].

So what can we do about this?  Any ideas?

All the best, Ian W.

[1]
Bug 333429 - Black on black messages in Apple OS X make KBounce unplayable
https://bugs.kde.org/show_bug.cgi?id=333429
[2]
Bug 330242 - Strange graphical glitches in Dolphin when the Terminal pane
is open and transparency is enabled in Konsole.
https://bugs.kde.org/show_bug.cgi?id=330242
[3]
https://trac.macports.org/wiki/KDEProblems/KDETickets
https://trac.macports.org/wiki/KDEProblems
These are some new wiki pages where we are collecting portability issues re KDE 
on
the Apple OS X platform, following recent discussions on this list.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to