Bug 165460

Summary: Some icons with "semi transparent" effect (disabled) get checkered pattern
Product: [Frameworks and Libraries] kdelibs Reporter: David Benjamin <davidben>
Component: kdeuiAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: cfeck
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: screenshot
Checkered icons on Okular menu (Plastique style)

Description David Benjamin 2008-07-01 05:19:02 UTC
Version:            (using Devel)
Installed from:    Compiled sources
OS:                Linux

Minor nitpick ( :-D ),

The Apply buttons in configuration dialog are greyed outed with a checkered overlay whereas the others are greyed out merely by desaturating them.
Comment 1 David Benjamin 2008-07-01 05:20:06 UTC
Created attachment 25753 [details]
screenshot
Comment 2 Christoph Feck 2009-03-25 08:29:41 UTC
I changed the title of the bug report to better describe the issue. I see this effect also on some icons with Plastique style and Okular menu, and I _think_ Oxygen explicitely worked around this bug by not using the KDE's icon effects for the menu icons.

I digged into the KDE sources to find the cause. As far as I understand, kiconeffect.cpp uses QApplication::desktop()->paintEngine()->hasFeature(QPaintEngine::Antialiasing) to find out if it should apply the bitmap mask, or use alpha transparency.

It looks like this call does not consistently return true, or paintEngine() is NULL, but that seems to depend on some internal state of the widget. I don't even know if it is valid to call this function on the engine without having a valid painter.

What's strange: It looks like it depends on the icon, so my other theory is that some PNGs are created differently.
Comment 3 Christoph Feck 2009-03-25 08:30:48 UTC
Created attachment 32381 [details]
Checkered icons on Okular menu (Plastique style)
Comment 4 Christoph Feck 2009-03-28 15:06:16 UTC
SVN commit 945882 by cfeck:

Use alpha channel for semi transparent 8 bit icons

I was long looking at this bug, but did not find the culprit until I
fired Okteta and looked at the PNG files. Some icons are optimized
to palettized mode (8 bit icons), and this made KIconEffect use the
ugly checked pattern.

BUG: 165460


 M  +12 -0     kiconeffect.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=945882
Comment 5 Christoph Feck 2009-03-28 15:12:57 UTC
SVN commit 945888 by cfeck:

backport r945882

CCBUG: 165460


 M  +12 -0     kiconeffect.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=945888