python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.5k stars 592 forks source link

Icon issue #690

Open nricciardi opened 1 year ago

nricciardi commented 1 year ago

I'm having problems displaying the icon set in the front-end, when I launch the app it is displayed in a common Chrome window.

thatfloflo commented 1 year ago

What OS is this, and what file format are your icons in?

nricciardi commented 1 year ago

What OS is this, and what file format are your icons in?

Linux Mint, the format is ico. What is the right procedure to set icon? Maybe I'm wrong.

thatfloflo commented 1 year ago

Chrome / Chromium on Linux does not support showing a web-app's favicon in the launcher as far as I know, so that's one limitation Eel can't do much about. You may be able to get around this by creating a custom .desktop file for a launcher entry and making e.g. Gnome or Cinnamon use that (whatever your shell of choice is). Chrome will still launch as a separate window with the Chrome/Chromium icon showing, unless your grab and link the window manager's ID for the window in the launcher, which is complicated and I cannot help with much.

For the Chrome/Chromium window itself (depending on whether the window manager / the window decorations it draws support this) you might have better luck getting your favicon displayed if you use a PNG instead of an ICO file.

Sorry I can't be of much more help, the issue is more to do with Chrome/Chromium than Eel, and they won't do much about it I'd imagine as they're not officially supporting their app mode anymore.

rraammiinn commented 1 year ago

I have created .desktop file for my program but chromium icon appears when it launches .

nricciardi commented 1 year ago

I have created .desktop file for my program but chromium icon appears when it launches .

Can you share it with us?

rraammiinn commented 1 year ago

[Desktop Entry] Type=Application Exec=/home/ramin/.pinit/venv/bin/python /home/ramin/.pinit/main.py light
Icon=/home/ramin/.pinit/pinit.svg Categories=Utility Name=pinit Terminal=false

rraammiinn commented 1 year ago

Screenshot from 2023-06-08 10-26-02

rraammiinn commented 1 year ago

it shows chromium icon . I tried png icon too but it makes no difference .

rraammiinn commented 1 year ago

is it possible to make it frameless ?