Priority: P3: Somewhat important
Affects Version/s: 6.0.0
Commits:fc91cd6b1306c6d452cbddab3c2289ccb92218d6(dev) 9e921538cef35d6346744884a59aaee396209a20(6.3) a023d7cdd588b39bee748af01404f9d9aa3e9f15 (6.2) 06b2f437219b5e44aebcff7c13362c062be06273(tqtc/lts-5.15)
On my Linux/Wayland (Gnome) system, when the DPI scale is set to 200%, the window title bar icon of my Qt application is displayed in low resolution. I have provided an QIcon with an appropriate hi resolution pixmap to `QApplication::setWindowIcon`, therefore I would expect a full resolution result.
The responsible code appears to be here: https://github.com/qt/qtwayland/blame/50dbd5f508e03f1cc57300830049581bef9c73b2/src/plugins/decorations/bradient/main.cpp#L165-L175
In this snippet, it is apparent that the QIcon 128x128 (or 256x256) pixmap is explicitly scaled to 22x22 native pixels, and then painted using the display scale aware `QPainter` which will scale it back up to 44x44 for display. As with
QTBUG-90363, the double scaling results in poor visual quality.
I suggest replacing the above code with the following:
That way, QIcon uses directly a pixmap with the appropriate size according to the display scale.
|For Gerrit Dashboard: QTBUG-90530|
|375185,3||Client: support high-dpi mode for window icon||dev||qt/qtwayland||Status: MERGED||+2||0|
|386154,2||Client: support high-dpi mode for window icon||6.3||qt/qtwayland||Status: MERGED||+2||0|
|386155,2||Client: support high-dpi mode for window icon||6.2||qt/qtwayland||Status: MERGED||+2||0|
|386157,2||Client: support high-dpi mode for window icon||tqtc/lts-5.15||qt/tqtc-qtwayland||Status: MERGED||+2||0|