Bug 488521 - Incorrect rendering of Mattermost app svg icon in Plasma 6
Summary: Incorrect rendering of Mattermost app svg icon in Plasma 6
Status: RESOLVED DUPLICATE of bug 448234
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 6.0.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-15 10:08 UTC by Dmitry Ivanov
Modified: 2024-06-26 05:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Mattermost app's icon - svg file (3.34 KB, image/svg+xml)
2024-06-15 10:08 UTC, Dmitry Ivanov
Details
Screenshot from Dolphin (249.17 KB, image/png)
2024-06-15 10:08 UTC, Dmitry Ivanov
Details
Screenshot from Plasma panel (64.83 KB, image/png)
2024-06-15 10:08 UTC, Dmitry Ivanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Ivanov 2024-06-15 10:08:09 UTC
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()
Comment 1 Dmitry Ivanov 2024-06-15 10:08:37 UTC
Created attachment 170515 [details]
Screenshot from Dolphin
Comment 2 Dmitry Ivanov 2024-06-15 10:08:59 UTC
Created attachment 170516 [details]
Screenshot from Plasma panel
Comment 3 Nate Graham 2024-06-17 17:32:16 UTC

*** This bug has been marked as a duplicate of bug 448234 ***
Comment 4 Dmitry Ivanov 2024-06-17 19:07:17 UTC
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.
Comment 5 Nate Graham 2024-06-17 19:22:49 UTC
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.
Comment 6 Dmitry Ivanov 2024-06-17 19:37:41 UTC
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.
Comment 7 Dmitry Ivanov 2024-06-26 05:35:43 UTC
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.