Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Custom icon theme not working [solved]

0 votes
This issue has been extensively discussed here:

https://github.com/numixproject/numix-icon-theme-circle/issues/865

In short, yEd does not respect custom icons.

Can you please help us debugging this issue?

Thanks!
in Help by (220 points)
edited by

1 Answer

+1 vote

Well, as a first step I suggest finding out if this is a Java problem or a desktop manager problem. According to the PKGBUILD file in the the yed repository, the default yicon from the yEd zip is installed to ${pkgdir}/usr/share/pixmaps/yed.png. Find this file and replace it with another PNG icon - e.g. this one:

Then restart your computer, start yEd again, and check which icon is used. If the old blue icon is displayed, then it is a Java issue (and you are out of luck because I doubt Oracle will go ahead and change Java's behavior in this regard). If the replacement icon is displayed, then the problem lies with your desktop manager or the yed.desktop file.

by [yWorks] (147k points)
Thank you thomas!

I replaced the icon. But still the old one is shown.

It cannot be a Java issue. Other Java applications use the correct icon.

See also this screenshot:

http://i.imgur.com/Y7eH11g.jpg

yEd uses Java API for setting the application icon (JFrame.setIconImage). It is Java's responsibility to handle the operating system specific details. If setIconImage does not work as expected, then this is a Java problem.

Can you name an open-source Java application that uses the correct icon?

SmartGitHg shows the correct icon.

SmartGitHg package: https://aur.archlinux.org/packages/smartgithg

Screenshot: http://i.imgur.com/vbIYU97.jpg
As a note, /usr/share/pixmaps/ is not the correct icon location by icon standards, but /usr/share/icons/hicolor/

Re SmartGitHg:

SmartGitHg does not seem to be a good example. It does not seem to be open-source, so there is no way to determine how SmartGitHg specifies the application icon. However, even if SmartGitHg was open-source, that would not help either because it uses SWT (a native GUI toolkit) instead of Swing (Java's cross-platform GUI toolkit). So, SmartGitHg is really not comparable to yEd with regards to handling application icons.

Moreover, SmartGitHg's desktop file conceptually differs from yEd's desktop file: SmartGitHg specifies an absolute icon path Icon=/opt/smartgithg/bin/smartgithg-256.png while yEd specifies a relativ icon path Icon=yed. Unfortunately, I know much too little about Linux desktop configuration to know which approach is correct/recommended.


Re correct icon location:

Well, yEd's PKGBUILD script specifies ${pkgdir}/usr/share/pixmaps/yed.png as destination for the application icon.

troffel, can you verify that ${pkgdir}/usr/share/pixmaps/ is the only directory with a yEd icon on your system? E.g. run find /usr/share/icons/ -type f -name "yed.*" to check the /usr/share/icons directory for yEd icons.

Apologise for my late reply.

The only yEd icon is located in:

~ find /usr/share/icons/ -type f -name "yed.*"
/usr/share/icons/Numix-Circle/48x48/apps/yed.svg

Do you think you can add something to the extensive discussion here?

https://github.com/numixproject/numix-icon-theme-circle/issues/865#issuecomment-58339830
I was able to resolve the issue. It turned out that I had to add 'StartupWMClass=B-A-A-B' to the yed.desktop file.

The reason is explained here: http://kb.openstudioproject.com/content/fix-double-google-chrome-icon-docky-and-plank
Thank you very much for posting the solution to your problem. That is very much appreciated.
Legal Disclosure | Privacy Policy
...