[PATCH] Don't scale favicon

Aurélien Gâteau aurelien.gateau at free.fr
Thu Dec 27 00:36:43 GMT 2007


David Faure wrote:

>> This sounds a bit more complicated to do. Would you agree to get the
>> patch applied as is for 4.0?
> 
> OK with me (although I wonder what changed the behavior of this code,
> kdebase/libkonq/konq_pixmapprovider.cc also says QPixmap small =
> SmallIcon( icon, size ) and y =0).

Hum... I don't have any kdebase/libkonq/konq_pixmapprovider.cc file... or is
it the KDE3 version?

Anyway, I have a better fix for the bug.

I looked a bit further in KIconLoader::loadIcon(), and found out it contains
some special code to handle favicons. It even knows how to blend the
favicon over the Web icon. This favicon code got broken because there is
no "www" icon anymore. I replaced it with "text-html" and it works again.
See kiconloader_favicon.diff.

Since KIconLoader::loadIcon() already blends the favicon, there is no need
for KonqPixmapProvider::loadIcon() to do it again. It simplifies the code
quite a lot. See konqueror_dont_scale_favicon2.diff.

Before testing, be sure to remove your icon cache
(/var/tmp/kdecache-$USER/kpc on my machine), or you might still get some
scaled favicons.

Is it ok to apply?

Aurélien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kiconloader_favicon.diff
Type: text/x-diff
Size: 526 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20071227/faadc316/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: konqueror_dont_scale_favicon2.diff
Type: text/x-diff
Size: 2988 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20071227/faadc316/attachment-0001.diff>


More information about the kfm-devel mailing list