Mastermindzh / tidal-hifi

The web version of Tidal running in electron with hifi support thanks to widevine.
Other
1.01k stars 56 forks source link

Linux desktop launcher shouldn't hardcode icon path #170

Closed BlueManCZ closed 1 year ago

BlueManCZ commented 2 years ago

The latest release introduced absolute icons paths in the desktop file Icon field:

Icon=/usr/share/icons/hicolor/0x0/apps/tidal-hifi.png

It is a step back from the previous release. Desktop files should never hardcode icons. It goes straight against Linux ideology allowing users to choose from different icon themes. And tidal-hifi icon is present in mainstream icon themes like Numix or Papirus.

All possible correct approaches:

  1. Creating the .svg icon and installing it to the /usr/share/icons/hicolor/scalable/apps/ directory >
  2. Installing the current .png icon directly to the /usr/share/icons/ directory >
  3. Downscaling the current icon to all necessary resolutions and installing it to appropriate hicolor directories (16x16, 22x22 ... 512x512) >

    > and then using Icon=tidal-hifi in the desktop file.

The second approach is probably the easiest one.

Mastermindzh commented 2 years ago

I didn't even consider this... this app has grown way more than I realized lol. Icon placement is handled by "electron-builder", I don't know how all of that works (in previous versions it would use the incorrect icon anyway).

Did the icon work with the themes before this version? If so I can just restore that... Let me know!

BlueManCZ commented 2 years ago

Yes, the icon from the theme did work correctly in the previous release, because the desktop file had it set to Icon=tidal-hifi. That is how I found out about this, as the tidal icon in my application dock was suddenly replaced with a hardcoded one. 😄

BlueManCZ commented 1 year ago

Hi, now it's even worse than before. You cannot name the icon just icon.png. It has to be named tidal-hifi.png and in the .desktop file referenced without the .png suffix, so Icon=tidal-hifi. As it was in 4.1.2