Bug 394788 - icon theme that doesn't comply with the specs
Summary: icon theme that doesn't comply with the specs
Status: RESOLVED NOT A BUG
Alias: None
Product: Breeze
Classification: Plasma
Component: Icons (show other bugs)
Version: 5.12.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: visual-design
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-28 10:13 UTC by Hans-Rudi Denzler
Modified: 2018-05-28 13:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Rudi Denzler 2018-05-28 10:13:00 UTC
https://github.com/vim/vim/issues/2957#issuecomment-392412715

If the directory layout of Breeze were

/usr/share/icons/breeze-dark/16x16/apps/system-help.svg

instead of the current

/usr/share/icons/breeze-dark/apps/16/system-help.svg

there would be no issue at all (The point is, 16x16/apps vs. apps/16).
Comment 1 Christoph Feck 2018-05-28 10:42:52 UTC
The "index.theme" lists the directories, and they can have any name, structure, and number of levels you want, as long as the information in the index file. I see no reference in the XDG icon theme specification that the directories need to have specific names.
Comment 2 Hans-Rudi Denzler 2018-05-28 13:35:42 UTC
 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.