Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.7.1, 5.9.1
-
None
-
Windows 7 64bit,
msvc2017: Qt 5.9.1 64bit + Qt 5.7.1 32bit
mingw 7.1.0: Qt 5.9.1 32bit
-
92c61b11c1704450adfa3a8ac839478c0f3dd19d (qtbase/5.9, 6.11.2017, 5.9.4)
Description
The tray icon on Windows is AFAIK 16x16 pixels on a standard DPI monitor. However, if an svg is given or an icon with multiple size, Qt chooses 32x32 pixel size. Then Windows downscales it and the icon becomes blurry.
IIRC correctly I didn't encounter this with Qt 5.6.
I did some digging and it appears that commit "QSystemTrayIcon/Windows: Use large icon for balloon message." b465fe759695bb7e1de693c3d4d20acfd2c49779 https://codereview.qt-project.org/#/c/160784/ caused this.
The commit message says that its purpose was to facilitate bigger icons in the balloon message. However, it touched code inside QSystemTrayIconSys::createIcon() which is responsible for the tray icon only. (at least on the current version of the file)
I assume that it shouldn't inquire about SM_CXICON metrics in that place. As far as I am able to see, icon for the balloon is created by the icon given in QSystemTrayIconSys::showMessage() (the variant that takes QIcon). Inside there it does again inquire about the metrics which is totally fine.
Forgive me if I am wrong. I read the code online on the git repo. So I may have missed something. I didn't have the time to compile Qt and confirm my suspicion.
Attachments
Issue Links
- resulted from
-
QTBUG-53591 QSystemTrayIcon converts multi resolution ico file to single 16x16 HICON on Windows
- Closed
For Gerrit Dashboard: QTBUG-63447 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
209684,2 | Windows: Use SM_CXSMICON instead of SM_CXICON for the tray icon size | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |