You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using tauricon to generate app icons, the .deb bundle sources its icons from different files. Notably, this includes the .icns file. The docs state that file endings png, ico and icns correspond to Linux, Windows and MacOS respectively.
In particular, the files generated include all sizes from the icns file, if it is present. Looking at the source, it appears possible that also the ico file can be used.
I am using a different icon source file for MacOS (see reasons below), and when building a .deb, I get icons mixed in from the icns file.
Reproduction
Generate an icon set from a source png using tauricon.
Set the default/recommended(?) tauri.bundle.icon in tauri.conf.json: [icons/32x32.png, icons/128x128.png, icons/128x128@2x.png, icons/icon.icns, icons/icon.ico]
Swap out the icns file for an entirely different icns file.
Build the deb
Verify the different icons in the data/usr/share/icons/hicolor dir. Some are from the icns, some are from the pngs. I see 10 different png files in different sizes and resolutions (compared with the 3 pngs in the src-tauri/icons dir).
Expected behavior
Honestly, it depends. I think the least surprising way is to copy over png files only, without the fallback. A lot of complexity is removed if png, ico and icns are platform-specific, and the fallback is removed. Omitting the fallback also allows power users to customize further, since only pngs are used in the long run. However, this would silently break icons for any user who currently does not have png files set up correctly.
Another option is to generate pngs from tauricon in even more resolutions and sizes, in order to prevent the fallback to kick in at all. However, this is quite wasteful and error prone to future changes.
That said, I haven't looked into the interactions with other uses of icons, such as the sys tray. Not sure if that changes anything.
Platform and versions
This is present in dev today.
Stack trace
No response
Additional context
There are several reasons one would use different icons for different platforms, and even multiple icon sources per platform:
In Apple's icon grid, the icon border has an inset from the actual image size (so that certain elements can "stick out" of the icon"). If you create such an image to fit for Mac, it will look too small on Windows and Linux.
On Mac it is very common with rounded squares, which are less common elsewhere. Discord, for instance, uses a circular unshaded icon on Linux and a shaded squircle on Mac.
On smaller sizes, details and bevel are often removed to make the icon more distinct and less cluttered.
I think it's fine with a default that uses a single source file, but it's important that this can be customized if necessary.
The text was updated successfully, but these errors were encountered:
Previously, all icon sources were consulted, and all sizes were used,
resulting in 10 icons with tauricon defaults for linux targets. Now,
only pngs are used for linux, which is consistent with other platforms.
fixestauri-apps#4280
betamos
added a commit
to betamos/tauri
that referenced
this issue
Jun 7, 2022
Previously, all icon sources were consulted, and all sizes were used,
resulting in 10 icons with tauricon defaults for linux targets. Now,
only pngs are used for linux, which is consistent with other platforms.
fixestauri-apps#4280
betamos
added a commit
to betamos/tauri
that referenced
this issue
Jun 7, 2022
Previously, all icon sources were consulted, and all sizes were used,
resulting in 10 icons with tauricon defaults for linux targets. Now,
only pngs are used for linux, which is consistent with other platforms.
fixestauri-apps#4280
Describe the bug
When using tauricon to generate app icons, the .deb bundle sources its icons from different files. Notably, this includes the .icns file. The docs state that file endings png, ico and icns correspond to Linux, Windows and MacOS respectively.
In particular, the files generated include all sizes from the icns file, if it is present. Looking at the source, it appears possible that also the ico file can be used.
I am using a different icon source file for MacOS (see reasons below), and when building a .deb, I get icons mixed in from the icns file.
Reproduction
tauri.bundle.icon
intauri.conf.json
:[icons/32x32.png, icons/128x128.png, icons/128x128@2x.png, icons/icon.icns, icons/icon.ico]
data/usr/share/icons/hicolor
dir. Some are from the icns, some are from the pngs. I see 10 different png files in different sizes and resolutions (compared with the 3 pngs in thesrc-tauri/icons
dir).Expected behavior
Honestly, it depends. I think the least surprising way is to copy over png files only, without the fallback. A lot of complexity is removed if png, ico and icns are platform-specific, and the fallback is removed. Omitting the fallback also allows power users to customize further, since only pngs are used in the long run. However, this would silently break icons for any user who currently does not have png files set up correctly.
Another option is to generate pngs from tauricon in even more resolutions and sizes, in order to prevent the fallback to kick in at all. However, this is quite wasteful and error prone to future changes.
That said, I haven't looked into the interactions with other uses of icons, such as the sys tray. Not sure if that changes anything.
Platform and versions
This is present in dev today.
Stack trace
No response
Additional context
There are several reasons one would use different icons for different platforms, and even multiple icon sources per platform:
I think it's fine with a default that uses a single source file, but it's important that this can be customized if necessary.
The text was updated successfully, but these errors were encountered: