Where do all the icons go?
posted 4 days agoThis article hopes to clear up any confusion surrounding where application developers and artists should install their KDE icons.
First some (simplified) history:
KDE 1 used locolor icons, they only have 16 colors and look pretty plain. KDE 2 used the hicolor theme, similar style to locolor but with more colors. KDE 3 changed to the CrystalSVG theme which we know and love today.
KDE 3 also saw the adoption of the freedesktop.org standard which changed hicolor from being an artistic theme to being the fall-back folder. The hicolor theme was renamed to kdeclassic and most of the icons were moved to kdeartwork/IconThemes.
When an application is installed in KDE it is usually associated with an icon.
First it will look in the user defined icon theme. (CrystalSVG unless you’ve picked another one).
If there is not an icon located there it will look to Hicolor (fall-back folder).
If there is not an icon located there it will look in the KDE default theme (CrystalSVG currently).
Other desktops which support the freedesktop icon standard (such as Gnome) do much the same thing: user theme->hicolor->gnome default theme. If you run a KDE program under Gnome the icons still get looked for the same as when running it under KDE (it doesn’t suddenly start to use Gnome icons).
So what style of icon should you supply for your application?
Presently you should supply a complete set of crystal style icons as that is the current default. If your application is within KDE they should be installed to the CrystalSVG folder. Pretty simple really.
Here are a few things to be aware of:
The application icon, as used in the Kmenu, will also be used in Gnome’s application menu. Since Gnome doesn’t look in CrystalSVG there needs to be an icon in hicolor.
Remember hicolor isn’t an artistic style so you can just move your application icon to hicolor and not install one to Crystal.
In some of the quieter corners of KDE are applications which have been there since KDE 2 but still don’t have icons in a Crystal style. When KDE moved from using hicolor/kdeclassic to using Crystal a lot of these icons were just renamed to be Crystal icons, but their artistic style is not Crystal. This is considered a bug.
All applications included with KDE that do not have a Crystal icon should therefore put their current icons in the CrystalSVG folder. Then file a bug report on http://bugs.kde.org/. At this point you should request that a Crystal icon be created by the artists at the KDE-Artists.org Kollaboration forum.
Once you have secured a new icon that matches the crystal style you should move your old icon to the kdeartwork/IconThemes/kdeclassic folder. If your icon does not match the kdeclassic style it should be completely removed. At this point you should close out the bug report for your icon.
It is worth noting that there are two ways to install icons, either globally or per app. There are a lot of apps KDE based or not that currently use the global icon install method and end up placing their icons in the wrong folder. This can be easily fixed with a quick change to their code.
To install globally call your icon something like cr32-mimetypes-foo.png and add KDE_ICON=auto to Makefile.am. To install your icon per app add something like this to your Makefile.am:
kwordicondir = $(kde_datadir)/kword/icons
kwordicon_ICON = AUTO
There is not much difference between installing icons globally or installing per app, do it whichever way you think is best.
A small note on SVGs.
A lot of icons in KDE don’t have SVGs and they are set not to be used by the Crystal index.theme file. This is an unfortunate result of past practices and makes it hard to maintain a lot of the icons. So always make icons as SVGs (you can touch up the PNGs if you need to, you often will for smaller sizes) and always add your SVG to the repository, it might not get used directly but it will be of very valuable use when maintaining KDE’s artwork.
Looking to the future: One day (in the not so distant future) KDE may change it’s default theme from Crystal. At that time the CrystalSVG icons in SVN will be moved to kdeartwork/IconThemes. The new default icons will use existing crystal icons to fill in the areas where the new default set is not yet complete. This will also ensure a smooth transition from one default to the next.
However there are a lot of applications not released along with KDE and after this transition will suddenly be installing icons to Crystal even though Crystal is no longer used. So all applications external to KDE should install all of their icons to hicolor.
In conclusion, apps released with KDE need to have their icons installed into the CrystalSVG icon folder. The following exceptions apply: The application icon should be placed in the hicolor folder. KDE applications that use the global install method that are not released with KDE should point their icons to the hicolor folder. All third party applications that use the global icon install method need to point their icons to the hicolor folder. (2) Discuss this article Last Updated ( Thursday, 24 November 2005 )