[PATCH] Using KIcon for icons with overlay

Allen Winter winter at kde.org
Sat Aug 25 01:06:48 BST 2007

On Thursday 23 August 2007 7:58:51 am Gustavo Pichorim Boiko wrote:
> A Wednesday 22 August 2007 14:25:59, Aaron J. Seigo escreveu:
> > On Wednesday 22 August 2007, Gustavo Pichorim Boiko wrote:
> > > Is there a way to apply a custom effect to an icon (in this case applying
> > > a color) before it gets the overlays drawn?
> >
> > so you want the overlay to not have the same effect as the overlay,
> > correct? so the overlay would be done using the regular presentation while
> > the icon might be greyed out, colourized, etc ... essentially anything in
> > KIconEffect?
> >
> > > If not, would it be possible to change KIcon to support this before 4.0?
> >
> > probably. do you have any specific API suggestions?
> I've tried to do it in a not-much intrusive way.
> This patch adds a setEffect() method to KIconLoader. If you want a custom 
> effect to be applied to a set of icons, just create a KIconLoader and set its 
> effect, and use this loader when loading icons.
> Every time you change the effect, the cache of the iconloader is discarded, 
> making sure the new effect is going to be applied to all requested icons.
> Please review it and make suggestions/critics to this approach.
I don't have any comments other than:
 1. I'd like to see some of the more knowledgeable icons folks comment
 2. I'd like to see this patch included with 4.0, if we can


More information about the kde-core-devel mailing list