[PATCH] Using KIcon for icons with overlay

Aaron J. Seigo aseigo at kde.org
Thu Aug 30 04:38:53 BST 2007


On Wednesday 29 August 2007, Gustavo Pichorim Boiko wrote:
> A Wednesday 29 August 2007 14:30:48, Aaron J. Seigo escreveu:
> > looking at the code, it seems this ought to go, at least in part, into
> > KIconEffect. in fact, with a quick glance all KIconEffect is missing is a
> > setEffect(int group, int state, KIconEffect::Effects effect, float value,
> > const QColor &color) method.
>
> I would like it to be like a "preprocessing" effect (or a postprocessing
> one as my implementation would say), that is applied before the effects for
> the states are applied, I don't know if this would be possible by this
> interface.

one could add another effect set to KIconEffect which does what you want/need 
here. "Custom", so to speak. then apply this to every icon if set; though 
this leaves the overlay issue. we could abuse State here though by adding a 
value that causes the Custom effect to be applied to an icon. when 
drawOverlays calls loadIcon it would do so with (state ^ CustomEfffect) (or 
whatever it is called). this would address this problem:

> > then kopete could do sth like:
> >
> > iconLoader->iconEffect()->setEffect(..)
>
> If the idea is not to have an extra KIconLoader, I don't like this
> approach, as it is easier for applications to make errors (one can forget

.. since you'd have to specify that you wanted the custom effect 
(pre-)applied.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070829/908133c2/attachment.sig>


More information about the kde-core-devel mailing list