Closed jcuenod closed 5 years ago
Hi,
I have already added it before. Here is the https://github.com/gusbemacbe/suru-plus/blob/master/apps/scalable/document/okular.svg.
I will investigate why this icon is not well displayed in Okular.
I see that now. Sorry.
Hmm, for me the icon is displaying when I search for Okular in the applications menu but it's not showing up in the alt-tab dialog.
Hmm, for me the icon is displaying when I search for Okular in the applications menu but it's not showing up in the alt-tab dialog.
Then it must be rendering bug. I will investigate it.
Thanks!
I can not replicate this issue because the icon is well rendered when I pressed alt+tab:
I know you are a KDE user, but what distribution of Linux do you use?
Actually I'm on gnome 3.30 using Antergos (basically Arch).
OK, I will test it on Manjaro GNOME.
I figured out the reason (I think): https://unix.stackexchange.com/questions/387614/modify-desktop-application-icon-after-progam-opens-e-g-in-alt-tab
Basically Okular's .desktop
files are stupid:
okularApplication_chm.desktop okularApplication_md.desktop
okularApplication_comicbook.desktop okularApplication_mobi.desktop
okularApplication_djvu.desktop okularApplication_ooo.desktop
okularApplication_dvi.desktop okularApplication_pdf.desktop
okularApplication_epub.desktop okularApplication_plucker.desktop
okularApplication_fax.desktop okularApplication_tiff.desktop
okularApplication_fb.desktop okularApplication_txt.desktop
okularApplication_ghostview.desktop okularApplication_xps.desktop
okularApplication_kimgio.desktop
So gnome-shell doesn't know that the okular
window belongs to any of those .desktop
files.
Just to confirm, I appended this line to okularApplication_pdf.desktop
and now it works:
StartupWMClass=okular
Maybe symlinking each of those names to okular.svg would be a decent solution?
okularApplication_pdf.svg -> okular.svg
Yes, symlink is the solution to keep the size economic.
I have checked all the Okular desktop files, but almost they use the same icon name. I have solved the bug, it was Gravit Designer metadata with base64 which prevented Okular (symlinked t document.svg) icon from being rendered, in reference to https://github.com/gusbemacbe/suru-plus/pull/34#issuecomment-425668398. Please download and test the unstable branch.
Hello, @jcuenod!
Please test the unstable branch. If it works, it will be merged into the master branch tomorrow.
Hmm, this didn't work for me.
Can you point me to the commit that should fix this because I'm not seeing the symlinks (I don't know where to look though - I checked scalable
and scalable/document
)
Sorry, I forgot of copying the files. I was in much hurry. I have just uploaded. It is in the branch unstable now.
You are added in the files AUTHORS and CHANGELG.
I credited you at my produt pagt at OpenDesktop. Unfortunately OpenDesktop is broken now.
For some reason I'm still having trouble.
I see all the symlinks but the icon is not changing for the alt-tab
dialog. I tried regenerating the cache but it didn't help. Any suggestions?
It can be KDE rendering bug or issue. I will check if there is something dirty in Okular icon.
It does show up in the applications overview, just not the alt-tab dialog. So it still seems like a window class issue.
It works on Manjaro KDE:
Then it must be KDE bug (because Okular is written in KDE).
But I will install Antergos with GNOME to investigate the cause.
In Antergos, I have noticed that using NUmix as efaut theme, the icon is having bad quality. You can see how the icon got a bit pixelated:
I set my icons theme. It still uses Numix icon instead of my icon. I understood what happened... As they are written in KDE, all the okular desktop files do not have StartupWMClass entrance, therefore, the KDE apps do not fit well on GNOME.
With StartupWMClass added in the desktop file, the icon returned to the normal, here:
It is why the KDE apps deskto files do not have StartupWMClass.
Hey @palob and @Foggalong, I do not know if you are working with Antergos.
Due the lack of StartupWMClass, Numix icons get pixelated in KDE apps on GNOME. And in addition, if somebody changes the icons theme, the icon will not be well displayed.
If adding StartupWMCClass, Numix icons will get unpixelated and return to the normal.
We are not currently officially affiliated with the Antergos project. Since it is an issue we've got no leverage on I only can direct you to https://github.com/bilelmoussaoui/StartupWMClassFixer.
Surely there's a better way than modifying the .desktop
files? Why do the Numix icons work (even if they're showing some sort of pixelated version)?
Hey @jcuenod
It is the default theme of Antergos. I did not install Numix. It came with Numix as default.
You can try to install StartupWMClassFixer.
Or maybe ask @bilelmoussaoui. He may know.
Hey, the startupwmclass is used to match the desktop file with the running processes. It's an issue with either the application itself or the window manager you're using. The only way to fix it here without any source code patches is using the startupwmclass script mentioned before or by adding it manually.
This doesn't make sense to me. Whether or not I define StartupWMClass=okular
in the .desktop
file, when I run xprop WM_CLASS
against Okular I get:
WM_CLASS(STRING) = "okular", "okular"
But, when I define StartupWMClass
the icon is displayed correctly; when I don't, it's wrong.
@gusbemacbe, I realise that Numix is the default (I'm also on Antergos) but that doesn't explain how Antergos correctly manages to figure out which Numix icon to use: it doesn't show a question mark icon or something, it shows a Numix Okular icon.
It may be legitimate to file a bug report against Okular though. I found this bug on Konsole: https://bugs.kde.org/show_bug.cgi?id=372441 (I don't have a KDE account though and I am loathe to create one just for this bug report).
@jcuenod, I suspect it be a KDE cache bug which prevented the update of StartupWMClass. Check if you have still icon-cache.kcache.
@gusbemacbe maybe I'm wrong but I don't think I have a icon-cache.kcache
file. I use gnome.
[Update]:
Nope, I was wrong. It's in ~/.cache/
. But now I'm not sure how deleting it would help. I deleted it for the heck of it but it's not clear to me what you think the problem is @gusbemacbe. I'm not trying to fix the icon for myself. I'm trying to fix what icon all Okular users on Gnome see when they use suru++.
@jcuenod
Finally, the problem is the icons cache. I recommend you to use Stacer which will clear the cache and refresh the icons theme. Then log out and log in.
Could you add an icon for Okular. Okular is (I think) the standard pdf reading application on KDE: