Created attachment 170514 [details] Mattermost app's icon - svg file SUMMARY I'm running OpenSUSE Tumbleweed with Plasma 6/Wayland and at some point a while back I noticed that the svg icon of a Mattermost app installed via flatpak started to render incorrectly: for some reason the white part of the icon in the middle doesn't render properly. I thought that it might be an issue with Qt6 svg rasterizer but a prototype PyQt6 app demonstrating the icon in a widget renders this particular icon correctly so the issue must be somewhere on the Plasma 6 side. STEPS TO REPRODUCE 1. Install Mattermost app via flatpak (com.mattermost.Desktop, version 5.8.1) 2. Add Mattermost app icon to a panel or just observe the app's svg icon via Dolphin in folder /var/lib/flatpak/app/com.mattermost.Desktop/current/active/files/share/icons/hicolor/scalable/apps/com.mattermost.Desktop.svg OBSERVED RESULT The app's icon is not rendered correctly - the white curvy part in the middle is seemingly rendered in wrong color. EXPECTED RESULT The app's icon is rendered correctly SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: OpenSUSE Tumbleweed 20240613, Wayland session (available in About System) KDE Plasma Version: 6.0.5 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.1 ADDITIONAL INFORMATION The app's icon is properly rendered in Inkscape and in the following PyQt6 prototype app: from PyQt6.QtGui import QPixmap from PyQt6.QtWidgets import QApplication, QMessageBox, QLabel app = QApplication([]) msg = QMessageBox() pixmap = QPixmap("/var/lib/flatpak/app/com.mattermost.Desktop/current/active/files/share/icons/hicolor/scalable/apps/com.mattermost.Desktop.svg") label = QLabel() label.setPixmap(pixmap) msg.layout().addWidget(label) msg.exec()
Created attachment 170515 [details] Screenshot from Dolphin
Created attachment 170516 [details] Screenshot from Plasma panel
*** This bug has been marked as a duplicate of bug 448234 ***
I don't think it is a duplicate of 448234. This bug does NOT reproduce with a sample PyQt6 app but only with plasma environment, unlike 448234 where a demo Qt app demonstrates the issue.
I can't see a way for it to not be the same issue. We're just using the Qt SVG renderer in Plasma, nothing fancy and Plasma-specific (or else we'd be using a better SVG renderer that didn't suffer from these annoying rendering problems). Perhaps when a QLabel is used to render an SVG, it goes down a different codepath when it rasterizes the SVG to a pixmap. We're not doing that in Plasma, or else live SVG recoloring wouldn't work.
Different codepath possibly could be the reason, but I'd just like to emphasize that in 448234 there's a pretty similar example which actually does demonstrate the underlying QtSVG issue. The only difference with my example is the use of PyQt6 instead of PyQt5.
This problem is now fixed after update to Plasma 6.1.0, KDE Frameworks 6.3.0, Qt 6.7.2. The icon is rendered correctly.