Hardcode-Tray icon indicating copy to clipboard operation
Hardcode-Tray copied to clipboard

Element icon keeps switching back

Open poperigby opened this issue 4 years ago • 13 comments

Specifications

  • Hardcode-Tray version : 4.3
  • Distribution : Arch Linux
  • Gtk version : Gtk3 1:3.24.27
  • Inkscape version : 1.0.2
  • Cairo version : 1.17.4
  • Application name : Element Desktop (1.7.23)

Expected behavior and actual behavior

Every time I run hardcode-tray, Element's tray icon gets properly switched, but when I start Element again the icon gets switched back after a couple of seconds.

Steps to reproduce the problem

  1. Close Element
  2. Run sudo -E hardcode-tray --conversion-tool RSVGConvert --size 22
  3. Start Element again

poperigby avatar Mar 26 '21 17:03 poperigby

strange behavior, i'm test with DEB-package 1.7.23 all worked fine and icon not changed... Try check visual changed icon on /usr/lib/element/img/element.png when switched after a couple of seconds. Also try maybe after applying hardcode-tray set read-only premissions for this icon: sudo chmod 444 /usr/lib/element/img/element.png

varlesh avatar Mar 27 '21 02:03 varlesh

@varlesh I have the same problem. It happens when i get any message. Also i can not find an element folder in /usr/lib. Using Kubuntu, newest version.

IF-Adin avatar May 07 '21 09:05 IF-Adin

It's old bug. Aplication initially use PNG but after loading - used ICO: https://github.com/bilelmoussaoui/Hardcode-Tray/issues/527 hardcode-tray not support ICO, but i think it's can be fixed manually. Try it:

cd /opt/Element/resources/img/
sudo ffmpeg -i element.png element.ico

varlesh avatar May 08 '21 05:05 varlesh

@varlesh Ok, i did what you said, but it changed nothing. It seems that it's not using the ico. I did a full search and i did not find an element.ico anywhere else on my drive.

Thank you for all the help by the way, you are awesome.

IF-Adin avatar May 08 '21 10:05 IF-Adin

Also, not sure if related, but i noticed that when i change the icon theme, the element tray icon disappears altogether. It is the only app that has this problem for me.

IF-Adin avatar May 08 '21 12:05 IF-Adin

Ok, so i have found the issue. The icon is in the webapp.asar When you unpack /opt/Element/resources/webpack.asar you can find the icon in /vector-icons/

IF-Adin avatar May 08 '21 14:05 IF-Adin

yes, on sources used favicon code... i think used favicon.ico for tray from webpack.asar anyway we can't fix that, because hardcode-tray not support ICO

varlesh avatar May 09 '21 02:05 varlesh

Ok, so i have found the issue. The icon is in the webapp.asar When you unpack /opt/Element/resources/webpack.asar you can find the icon in /vector-icons/

Hmm... I can't find the /Element folder in /opt

at-pyrix avatar Jun 04 '22 07:06 at-pyrix

on Archlinux it's /usr/lib/element

varlesh avatar Jun 04 '22 08:06 varlesh

ok, thanks

at-pyrix avatar Jun 04 '22 09:06 at-pyrix

Any news on this issue? It's not possible to fix the .ico using ffmpeg?

rauldipeas avatar Jul 30 '22 04:07 rauldipeas

My temporary fix, maybe help someone...

npx asar e\
    /opt/Element/resources/webapp.asar\
    element-asar
rsvg-convert -f png\
    /usr/share/icons/Papirus/24x24/panel/element-desktop-tray.svg\
    -o element-asar/vector-icons/favicon.*.ico
npx asar p\
    element-asar\
    webapp.asar
sudo cp -rf\
    webapp.asar\
    /opt/Element/resources/
sudo rsvg-convert -f png -h 256 -w 256\
    /usr/share/icons/Papirus/24x24/panel/element-desktop-tray.svg\
    -o /opt/Element/resources/img/element.png
rm -rf\
    element-asar\
    webapp.asar

rauldipeas avatar Aug 04 '22 20:08 rauldipeas

yes, on sources used favicon code... i think used favicon.ico for tray from webpack.asar anyway we can't fix that, because hardcode-tray not support ICO

As you can see on my temporary fix, there's no need to convert to ico format, just use the png format and everything's fine.

rauldipeas avatar Aug 04 '22 20:08 rauldipeas