helloSystem / Filer

A file manager that can also render the desktop
GNU General Public License v2.0
33 stars 8 forks source link

Idea: Support icns icons as well #120

Closed probonopd closed 3 years ago

probonopd commented 3 years ago

Interestingly it seems like icns images already get correct previews in Filer, so what is holding us back from fully supporting them in addition to png?

This is how an icns is already now shown in Filer:

image

FreeBSD% file 'tdmgr.icns' 
tdmgr.icns: Mac OS X icon, 67327 bytes, "ic09" type

For testing: The icon in question is from https://github.com/jziolkowski/tdm/blob/master/tdmgr.icns

cc @mszoek

probonopd commented 3 years ago

Turns out this might be really easy as it already works if one renames the icns to png...! I wonder what is doing the magic.

Interestingly enough, Menu also works with icns "just like that". Dock seemingly doesn't (or does it?).

Makes me even wonder whether we should make icns the default in helloSystem, since it can store multiple icon sizes in one file, which is way more elegant than the XDG Icon Spec.

probonopd commented 3 years ago

Rotfl.

Turns out I had already implemented this!

https://github.com/helloSystem/Filer/blob/091472e8068d5f08b8802c4dc98bf7ea2446c5a3/src/bundle.cpp#L141-L148