Martchus / syncthingtray

Tray application and Dolphin/Plasma integration for Syncthing
https://martchus.github.io/syncthingtray/
Other
1.74k stars 45 forks source link

Icons rendering in plasmoid has lower quality than the tray application #282

Open mrpink17 opened 1 month ago

mrpink17 commented 1 month ago

Relevant components

Environment and versions

Bug description The rendering of some icons in plasmoid is not as good as in tray application

Plasmoid

plasmoid-app

Tray application

tray-app

Martchus commented 1 month ago

Looks like the icon rendering is broken in the Plasmoid. For me the icon rendering generally¹ works within the Plasmoid as well. Does it work under X11?


¹ Today I noticed that Plasma falls back to software rendering on my Arch system when using Wayland. With this the entire shell looks quite broken when it comes to icons. Switching to X11 helped but I'm wondering what's wrong with Plasma on Wayland since the last update. The issue I am experiencing is definitely not specific to this Plasmoid but means I can currently not develop/test under KDE/Wayland. And under KDE/X11 I cannot reproduce any rendering issues with the Plasmoid.

mrpink17 commented 1 month ago

No, Wayland and X11 look the same

Martchus commented 1 month ago

Then probably related to the way this renders ForkAwesome icons considering only these icons are affected. It looks like you enabled to prefer system icons instead of ForkAwesome icons. Maybe that is not working with the Plasmoid. I haven't tested this config for ages so it might be broken.

Martchus commented 1 month ago

Looks like the Wayland-related issue I mentioned is actually more NVIDIA-related and tracked on https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/80.

I can reproduce the issue you've mentioned when enabling the setting to prefer system icons over ForkAwesome icons. So as a workaround I suggest you disable this setting. You'll need to restart plasmashell for this to have an effect.

Martchus commented 1 month ago

I have no idea why the icon rendering doesn't work in this case. I tried to play around with the rendering code but it looks like it might be a Qt bug.

Do you know since when this issue is occurring? Maybe this is even a regression of Qt because I vaguely remember that this worked at some point. (Since I don't use the prefer system icons setting I can't really tell myself.)

mrpink17 commented 1 month ago

I can confirm it used to work, but it was many months ago. I feel it happened after upgrading the synchthingtray package, not a Qt upgrade, but I'm not 100% sure

Martchus commented 1 month ago

The relevant code on my side is actually this line in qtforkawesome: https://github.com/Martchus/qtforkawesome/compare/v0.1.0...v0.2.1#diff-bbdda2a0a28454037de0dc03c0077fd4b526a8b0027652e04e8d3e88c70ad8ecR151

But it hasn't changed for quite a while in it is merely using QIcon::pixmap().

Martchus commented 1 month ago

Looks like this is still broken on Qt 6.7.3.

The icons look good on a plain Qt Quick application when using Qt ForkAwesome in the same way (when using Data::setForkAwesomeThemeOverrides()). I tested this with the Qt Quick GUI I'm currently developing. So this issue might be a problem within the Plasmoid-specific code or an upstream Plasmashell issue.