https://bugs.kde.org/show_bug.cgi?id=394788

--- Comment #2 from Hans-Rudi Denzler <hr.denz...@bluewin.ch> ---
 nuko8 commented an hour ago

I'm not a KDE user. So I don't think I'm qualified enough to answer the
question there.

Instead, let me show you some excerpts from the specs:

    Applications may further add their own icon directories to this list, and
users may extend or change the list (in application/desktop specific ways)
---from the section "Directory Layout" (Emphasis mine)

So, as someone who replied to you said, you can do anything with the directory
layout. At the same time, if you don't follow those application/desktop
specific ways, you have no choice but to give up making best use of them.

    In the theme directory are also a set of subdirectories containing image
files. Each directory contains icons designed for a certain nominal icon size
and scale, as described by the index.theme file. The subdirectories are allowed
to be several levels deep, e.g. the subdirectory "48x48/apps" in the theme
"hicolor" would end up at $basedir/hicolor/48x48/apps. ---from the section
"Directory Layout" (Emphasis mine)

Here, you see "hicolor/48x48/apps" instead of "hicolor/apps/48". Arguably, one
can call it no more than an illustrative example, not part of the specs.
However, the section Icon Lookup says:

    The lookup is done first in the current theme, and then recursively in each
of the current theme's parents, and finally in the default theme called
"hicolor" (implementations may add more default themes before "hicolor", but
"hicolor" must be last). As soon as there is an icon of any size that matches
in a theme, the search is stopped. Even if there may be an icon with a size
closer to the correct one in an inherited theme, we don't want to use it. Doing
so may generate an inconsistant change in an icon when you change icon sizes
(e.g. zoom in).---from the section "Icon Lookup" (Emphasis mine)

As such, it'd be better to have a directory layout which would help the lookup
algorithm work efficiently, thereby giving a better UX rather than giving
wasted space to toolbars.

    The lookup inside a theme is done in three phases. First all the
directories are scanned for an exact match, e.g. one where the allowed size of
the icon files match what was looked up. Then all the directories are scanned
for any icon that matches the name. If that fails we finally fall back on
unthemed icons. If we fail to find any icon at all it is up to the application
to pick a good fallback, as the correct choice depends on the context.---from
the section "Icon Lookup" (Emphasis mine)

So, (name, size)-pair match first; then, name-only match next. To implement
such a lookup algorithm, a directory layout having size/whole-name (e.g.,
48x48/apps) are more natural and easier to handle than one having
part-of-name/size/part-of-name (e.g., apps/48).

In conclusion, as someone who replied to you said, names themselves don't
matter at all. The order of them only matters, I think.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to