diff options
author | Andy Shaw <andy.shaw@nokia.com> | 2010-03-02 10:39:28 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@nokia.com> | 2010-03-02 10:39:28 +0100 |
commit | b08f42e5cc0d94a3b54494f6fe0af90be858f1eb (patch) | |
tree | 93b4b72926786a9f7cdb734690fbceb219d2194b /src/gui/util/qsystemtrayicon_mac.mm | |
parent | 2d0e06a495b5c5a723997eef9618fdd7a7bc98b1 (diff) | |
download | qt4-tools-b08f42e5cc0d94a3b54494f6fe0af90be858f1eb.tar.gz |
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/gui/util/qsystemtrayicon_mac.mm')
-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 0265a8372a..d829947054 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]; |