KIconLoader workaround - For now, till QtSvg gets fixed

Rafael Fernández López ereslibre at kde.org
Wed Oct 17 01:14:59 BST 2007


Hi all,

KIconLoader current implementation follows the next steps for loading icons:

       less specific fallback in this theme: png, svgz, svg, xpm exact match
                                             png, svgz, svg, xpm best match
       even less specific fallback in this theme: [same order]
       (...)

       next theme in inheritance tree: png, svgz, svg, xpm exact match
                                       png, svgz, svg, xpm best match
       less specific fallbacks in this next theme
       (...)

       next theme in inheritance tree: png, svgz, svg, xpm exact match
                                       png, svgz, svg, xpm best match
       less specific fallbacks in this next theme
       (...)

       and so on.

This leads us to a problem. As this movie shows:
http://media.ereslibre.es/2007/10/kiconloader.mpeg

SVG's on some cases will be tried to be rendered. There is a bug, indeed that 
when bigger than the biggest icon it should be rendered from SVG's, but that 
will be fixed later... The problem is that in some sizes between the max and 
the min SVG's are trying to be rendered.

This is a problem as Riccardo, Pinheiro and Piacentini pointed out before till 
the QtSvg renderer gets fixed on Qt 4.4. Till that time I propose to apply 
the patch at:
http://media.ereslibre.es/2007/10/kdeui.diff

that will ignore SVG's for now. Always icons will be resized from other PNG's. 
That means in logic terms:

       less specific fallback in this theme: png exact match
                                             png best match

and that's all for now. Because we should always be capable of finding a png 
of best match, so the svg is never asked, we always get a result before that.

This gives the video result:
http://media.ereslibre.es/2007/10/kiconloader-only-png.mpeg

Should I commit the patch ?


Bye and thanks,
Rafael Fernández López.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071017/d895d409/attachment.sig>


More information about the kde-core-devel mailing list