[PATCH] Fix loading 22x22 icons with KIconLoader

Ingo Klöcker kloecker at kde.org
Sun Oct 26 09:30:48 GMT 2003


On Sunday 26 October 2003 02:21, Antonio Larrosa Jiménez wrote:
> El Saturday 25 October 2003 19:31, Ingo Klöcker escribió:
> > Hi,
>
> Hello Ingo,
>
> > the attached patch should fix the problem with the icons in the
> > system tray. For example klipper and ksirc both have a 22x22 icon.
> > But the iconloader loads the small 16x16 icons and then scales them
> > to 22x22 which gives them a blurry look (cf. Eva's message "Am I
> > the only one who thinks this is ugly?").
>
> I'm sorry because being the maintainer of those classes I should have
> fixed it a long time ago, but I'm lately very busy (I've just
> finished working today, at _this_ hour). So thanks for fixing it.
>
> But I'm afraid there's still some problems. The code you fixed was
> inside a "if (group == KIcon::User)" block, and definitely, icons
> that are used in the system tray should _never_ be User icons, so
> even if your patch made the icons look good, it seems the real
> problem is somewhere else.

Unfortunately this change didn't fix the problem with the system tray 
icons. The ( group != KIcon::User ) branch looked okay so I thought the 
problem would be in the ( group == KIcon::User ) branch which is called 
as fallback from the "!=" branch.

> Also, the behavior of loadIcon is broken now. There are two kind of
> icons, "User" icons, and the rest (themed icons). If you ask for a
> User icon, the size should be ignored because user icons are not
> themable, are not resizable, etc. So your version will modify the
> request to iconPath and just ask for icons of a given size without
> telling it that you really want a User icon, and then iconPath will
> look in the directories for themed icons, instead of the directory
> for User icons.

Hmm, that's of course due to the fact that someone thought it would be 
cool to save a parameter in iconPath by passing size or group with the 
same parameter. Obviously this way some information is lost. I think 
the proper way to fix this is to deprecate iconPath and to add a new 
iconPath which takes size _a_ icon group as parameter.

Adding overloads is BIC AFAIK so this shouldn't be a problem, right?

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031026/736ccb1b/attachment.sig>


More information about the kde-core-devel mailing list