diff options
author | Andy Shaw <andy.shaw@nokia.com> | 2010-03-02 09:39:28 (GMT) |
---|---|---|
committer | Andy Shaw <andy.shaw@nokia.com> | 2010-03-02 09:39:28 (GMT) |
commit | b08f42e5cc0d94a3b54494f6fe0af90be858f1eb (patch) | |
tree | 93b4b72926786a9f7cdb734690fbceb219d2194b /src | |
parent | 2d0e06a495b5c5a723997eef9618fdd7a7bc98b1 (diff) | |
download | Qt-b08f42e5cc0d94a3b54494f6fe0af90be858f1eb.zip Qt-b08f42e5cc0d94a3b54494f6fe0af90be858f1eb.tar.gz Qt-b08f42e5cc0d94a3b54494f6fe0af90be858f1eb.tar.bz2 |
Make the icon visible when set on an action in a QSystemTrayIcon on Mac
This was a Carbon specific problem, it was already working fine in
Cocoa
Task-number: QTBUG-8521
Reviewed-by: richard
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/util/qsystemtrayicon_mac.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm index 0265a83..d829947 100644 --- a/src/gui/util/qsystemtrayicon_mac.mm +++ b/src/gui/util/qsystemtrayicon_mac.mm @@ -530,7 +530,11 @@ private: [item setToolTip:(NSString*)QCFString::toCFStringRef(action->toolTip())]; const QIcon icon = action->icon(); if(!icon.isNull()) { +#ifndef QT_MAC_USE_COCOA + const short scale = GetMBarHeight(); +#else const short scale = [[NSApp mainMenu] menuBarHeight]; +#endif NSImage *nsimage = static_cast<NSImage *>(qt_mac_create_nsimage(icon.pixmap(QSize(scale, scale)))); [item setImage: nsimage]; [nsimage release]; |