Closed vinzv closed 4 years ago
This is where that code is:
The issue is that we don't send a vector icon, only a raster one. Unfortunately, our toolkit currently doesn't support vector icons. 😞
This is an issue with libyui, and needs to be fixed there: https://github.com/libyui/libyui/issues/126
hmm.. https://www.pling.com/p/1254749/
therewith be you in possible move a 256x256 png in a svg/svgz and have a clean, sharp icon who be in able for a nice scaling ..
i have make it with my whole iconthemes https://www.pling.com/u/blackcrack/ with the script : https://www.pling.com/p/1224130/
IIrc in updater i changed that... if you use an svg file is converted to png...
@anaselli I saw some code doing that here. Yet I don't think it works. Forcing another icon path to svg files still loads the 128px png:
$ dnfdragora-updater --icon-path /usr/share/icons/hicolor/scalable/apps/
Skipped exception: <[Errno 2] Datei oder Verzeichnis nicht gefunden: './dnfdragora.yaml'>
Icon: /usr/share/icons/hicolor/128x128/apps/dnfdragora.png
The same happens with directly pointing to the svg file. Both ways the tray icon stays blurry.
As far as i can say it should load the theme one or our default if not present but i see it is a 128 pixels icon anyway as you can see here Maybe you can force it to 256 px iirc it should take the biggest one but at most at the size. If it works we can change it.
Tried forcing 256px version, same result:
dnfdragora-updater --icon-path /usr/share/icons/hicolor/256x256/apps/dnfdragora.png
Skipped exception: <[Errno 2] Datei oder Verzeichnis nicht gefunden: './dnfdragora.yaml'>
Icon: /usr/share/icons/hicolor/128x128/apps/dnfdragora.png
I also copied the 256px png to some different location to make sure it's no path issue. But the result was exact the same.
I'm not sure but i think /usr/share/icons/hicolor/128x128/apps/dnfdragora.png is your theme icon- And you should change 256 into code
pathname = xdg.IconTheme.getIconPath("dnfdragora", 128)
and of course having a 256 theme icon. For some reasons i can't remember now - a previous bug maybe- theme icon wins so option icon-path doesn't
I applied the patch and now I can at least force the use of a different path. Nevertheless, the icon stays blurred. I tried various sizes and even completely different icons but without any luck. :-(
i don't think our 256x256 icon is so nice... maybe you should try something better (fedora should have changed our icons iirc), contributes are also welcome :D
I can try to make something, but that won't solve this issue. See this quick try:
The PNG has 256x256 px at 96dpi and still gets blurred. I assume the conversion done in Python messes it up somehow.
Edit:
I just found this which shows that pyrsvg
might be the way to a solution. Or go with SVGs overall instead which would be a good idea regarding HiDPI sreen compatibility.
Well that icon is from a contributor, I'm not a graphic designer so I probably won't be able to do a good job there anyway. But I am ready to release any better solution from contributors . And yes we convert any svg provided as theme for instance to png by using cairosvg already.
Could you please new icons added by @pontaoski?
The tray icon of dnfdragora-update is blurry in Plasma 5 (OpenMandriva Lx 4), see screenshot:
I tried to fix it manually and dug through the source, both without any luck. Can you fix that or tell me where to look at?