Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.2, 6.3.0
-
None
Description
If a Windows (Toast) Notifiaction is send with the showMessage function of QSystemTrayIcon the given Icon is in the wrong resolution. The icon itself is scaled into a smaller resolution and upscaled by Windows to the desired size. As you can see in the image attached the icon is completly pixelated.
The error should reside in qwindowssystemtrayicon.cpp at line 283:
QPixmap pm = icon.pixmap(size); if (pm.isNull()) { tnd.dwInfoFlags = NIIF_INFO; } else { if (pm.size() != size) { qWarning("QSystemTrayIcon::showMessage: Wrong icon size (%dx%d), please add standard one: %dx%d", pm.size().width(), pm.size().height(), size.width(), size.height()); pm = pm.scaled(size, Qt::IgnoreAspectRatio); } tnd.hBalloonIcon = qt_pixmapToWinHICON(pm); }
On Windows 8.1 or newer the check if it's a large or small icon should be deprecated.