Bug 148764 - Icon themes need to include metadata and different variants in one package
Summary: Icon themes need to include metadata and different variants in one package
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected)
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Depends on:
Blocks: Icon-Themes
  Show dependency treegraph
Reported: 2022-04-25 06:31 UTC by Mike Kaganski
Modified: 2022-04-25 15:10 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-04-25 06:31:34 UTC
Current icon themes are packed in infinitely naïve way: a zipped directory (which name consisting of a single "word" (!) makes its UI name (tdf#141000 is an example of a palliative attempt to make it somehow work)) filled with tons of sub-directories, image files, and a "links.txt" mapping those images to internal resource names - but no metadata like true name, version, or icon variants.

This makes many things impossible. You can't have normal names (e.g., some characters are prohibited in file names on many FS); you can't have versioning; you can't make themes support dynamically changing environments (switching night mode, dark mode, different resolutions, etc.) which is common today - the resolution may change when a window moves from one monitor to another, and day/night or light/dark mode may change depending on time of the day. Icon themes get multiple items in the View->Icon Style list: Breeze; Breeze (SVG + dark); Breeze (SVG); Breeze (dark) ...

The normal icon theme should:
1. Include normal metadata that would allow to have normal naming independent on the filename, versioning, integrity hash, copyright, etc.;
2. Allow to contain several variants (e.g. light and dark), allowing application to choose relevant variant of the user-chosen theme automatically depending on environment;
3. In each variant, allow to have multiple resolutions (ideally, a vector - SVG - and optionally several pre-rendered bitmap variants for typical and/or hard-to-render-automatically resolutions);
4. Each resource should also allow to have several sizes (to minimize proliferation of resource variants, when we need "small" and "large" resources e.g. for toolbars depending on user's toolbar button size preference).

There needs to be a re-design of the icon theme packing concept/design to include these (and maybe others?) considerations.
Comment 1 andreas_k 2022-04-25 13:14:58 UTC
+1 for update the icon packaging.

about the licence and other information stuff, we can use the "packaging" of our extensions. There most stuff should be already available like maintainer, license, ... description.

All icon themes within LibO core area available as svg files AND were done first as svg file (inkscape). So the png files (which was used by LibO) are only renderd from the svg files.

Light / Dark
The colibre icon theme was done for light and dark. Dark icons are NOT ONLY use other colors. Most icons are black -> white but there are icons which are different like you see a sun on insertgraphic and a moon in dark mode. Be aware of this.

since 6.4 I wait for native svg icon theme support that look good. We are all for svg icon theme support, but the quality is now bad.

from my point of view it's enough that the complete package has one license so no need for file specific informations.

sc_ lc_
it's ok(isch) that libreoffice icons didn't use freedesktop icon names, but it would be nice if it does.
What is a pain are the prefix sc_ for 16px and lc_ for 24px icon sizes. the 32px icons already have a separate folder. It would be nice if the sc_ and lc_ files will also get there separtae folder.
about folders. I didn't know why there are cmd, sw, sd, ... folders. from a designer point of view ALL icons could be in one folder depend on the size. Like we know from gnome/kde, ... icon themes.
Comment 2 andreas_k 2022-04-25 13:16:07 UTC
I would help with all the changes, but from my point of view a good time for this changes would be the switch to svg icons.
Comment 3 Heiko Tietze 2022-04-25 14:01:53 UTC
+1 for the metadata.

But mixing different themes into one file sounds not like a good idea. This means, for example, you pick first Yaru (available from the extensions site) and then the flavor (1 out of ~10). 

Kendy had the idea to alternate SVG icons so colors would be user-configurable (see also bug 124966). Seems to be more flexible.

Missing in your list of issues is bug 124956 with all the icons that depend on locale settings, the reading direction, etc.
Comment 4 andreas_k 2022-04-25 14:44:59 UTC
Another issue about mixing light/dark theme is that LibO has a lot (to much) icons so it's a lot of work to initial make an icon theme for LibO. Have there light and dark would be result in additional work, so evern less community members would support LibO with there icons.

So one goal has to be also to minimize the work as much as possible (different color -> color scheme for svg icons replace #fff with #000 simple and usefull. You only have to add an color scheme file.
Comment 5 andreas_k 2022-04-25 14:47:58 UTC
In addition we (I) could offer a links.txt file where the freedesktop filenames will be translated to the LibO icon names. This would help icon designers a lot to support there work within LibO.

maybe it's a different task, than let's make a separate bug report, if a developer will offer support for a second freedesktop.txt file which will look like links.txt and link the freedesktop.org filename with LibO ones.