[PATCH] Fix loading 22x22 icons with KIconLoader

Antonio Larrosa Jiménez larrosa at kde.org
Sun Oct 26 10:40:58 GMT 2003


El Sunday 26 October 2003 10:30, Ingo Klöcker escribió:
> On Sunday 26 October 2003 02:21, Antonio Larrosa Jiménez wrote:
> > El Saturday 25 October 2003 19:31, Ingo Klöcker escribió:
> > > the attached patch should fix the problem with the icons in the
> > > system tray. 
>
> Unfortunately this change didn't fix the problem with the system tray

hmm ?

> > 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 

Please don't degrade other's people code if you don't understand it (and 
no, I didn't write that method, I'm just maintaining it). Please read 
below.

> 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.
>

No, that's not a solution. If you want a ToolBar icon, then all you're 
saying is that you want a themed icon of the size of toolbar icons 
(whatever kcontrol says), but if you want a user icon, then it's not 
themed, and it's not resizable so we never resize them (did you notice 
that the UserIcon function doesn't have a size parameter?), user icons are 
there for people who want to load just an icon, always the same icon, and 
plainly, _that_ icon.
You should think of icon Groups as just generic, configurable sizes, but 
it's just a size, so it's ok to use the size parameter for groups too.

As I said, I'll try to have a look as soon as I can, but now, I have to go 
back to work :(

Greetings,

--
Antonio Larrosa Jimenez
KDE developer - larrosa at kde.org
http://developer.kde.org/~larrosa/
Anyone who doesn't know maths is not fully human. At best he is a tolerable 
subhuman who has learned to wear shoes, bathe and not make messes at home.




More information about the kde-core-devel mailing list