MatthiasGrandl / Loungy

Loungy is a WIP launcher in the vein of Spotlight, Alfred, Raycast.
MIT License
1.35k stars 70 forks source link

linux: png app icons #20

Closed Bloeckchengrafik closed 4 months ago

Bloeckchengrafik commented 4 months ago

This is a small pr that renders .png app icons on linux.

Svg from files doesn't seem to be supported by gpui currently. Do you have an idea on how to load these? If not, I'd wait with that until that's doable easily on gpui-side.

MatthiasGrandl commented 4 months ago

Cool! Is this already taking the current freedesktop icon theme into account?

Do you have an idea on how to load these?

Nope :( Seems the only way to render SVGs is by embedding them currently. We could convert them to PNGs and cache them in the cache folder. But agreed ideally external SVGs should get support in GPUI.

Bloeckchengrafik commented 4 months ago

This seems to use the default icons provided by the installed software and doesn't respect icon themes yet. I think this should be the topic of a future PR since there is no good way of getting theme information with gpui currently. Sure, we could add gtk or fltk as a dependency, but these are very heavy. Also, even the zed team hasn't decided on this yet. That's also one of the reasons why this is currently not implemented if I heard it correctly.

MatthiasGrandl commented 3 months ago

@Bloeckchengrafik I'll start working on upstream GPUI SVG support as soon as I have the go-ahead from the Zed team. I think I figured out the proper way to do it.

MatthiasGrandl commented 3 months ago

@Bloeckchengrafik https://github.com/zed-industries/zed/pull/9436