The problem of icon names
Frans Englich
frans.englich at telia.com
Thu Jul 15 00:28:33 BST 2004
When we use icons in our applications, we look up one in the icon theme
matching our intent, and load it by its name. For example, the restart button
in the logout dialog uses Konqueror's reload icon because it looks like what
we wants.
This causes a problem: it breaks the modularized design. When Konqueror's
reload button is decided to be updated, the new look does perhaps not fit the
intent in the logout dialog(or any other place it is used). Not to think of
when a whole icon theme is updated or switched.
I think the solution to this problem is to add an optional mapping layer
between the icons and the icon loading mechanism; the icon theme can specify
"the icon X goes under the name X, as well as the pseudo icons named Z, Y and
N." For example, the crystalsvg theme could specify "the restart icon maps to
Konqueror's reload icon."
This has the following advantages:
* It solves the modularity problem described above
* It lowers the threshold of creating icon themes since one can cover all
icons usages without having actual icons for them.
In short, it significantly helps the problem of icon names being hard coded,
and gives additional flexibility. For example, if icon names once becomes
standardized, the icon names in the code can be changed, and icon themes
easily keep up without having to create icons.
However, "pseudo" icons would take a little longer to load(due to the mapping
overhead) and a similar result can be achieved by simply copying the icons.
Is it only me who sees this problem, or have I missed something crucial? If
not, I will probably cook something up for the free desktop icon theme spec.
Frans
~
~
More information about the kde-core-devel
mailing list