From b08f42e5cc0d94a3b54494f6fe0af90be858f1eb Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 2 Mar 2010 10:39:28 +0100 Subject: 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 --- src/gui/util/qsystemtrayicon_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) 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(qt_mac_create_nsimage(icon.pixmap(QSize(scale, scale)))); [item setImage: nsimage]; [nsimage release]; -- cgit v0.12