Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.5, 5.1.1, 5.2.0
-
OS X
-
-
f3699510d42e5ee910521c0463d9710f77ad4ff1
Description
Search for "qt_mac_create_nsimage" in "qsystemtrayicon_mac.cpp" and you will find multiple locations where it scales the icon to "scale x scale" where "scale" is "[[[NSApplication sharedApplication] mainMenu] menuBarHeight] - 4".
This value does not depend on the pixel scale factor, so we get low-res icons on retina capable systems, even though we supply high resolution icons.
Also it is less than ideal to scale it to a square with sides equal to the menu bar height (minus 4), since icons on mac can typically be rectangular. In particular, I have pixel perfect icons designed for mac, and would like them to be used 1:1.
I wish there was a virtual method or something I could override in QSystemTrayIcon to get get my wanted (correct) behavior, while the default could implement the backward compatible behavior.
By the way, I can not find "qsystemtrayicon_mac.cpp" in the Qt 5.1.1 sources (qt-everywhere-opensource-src-5.1.1), so I don't know whether it's affected.
Attachments
For Gerrit Dashboard: QTBUG-33441 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
94170,2 | Cocoa: Fix icon size calculation for system tray. | 5.3 | qt/qtbase | Status: ABANDONED | 0 | 0 |
94966,4 | Cocoa: Fix icon size calculation for system tray. | 5.4 | qt/qtbase | Status: MERGED | +2 | 0 |