summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qsystemtrayicon_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/util/qsystemtrayicon_mac.mm')
-rw-r--r--src/gui/util/qsystemtrayicon_mac.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm
index 348657e..d943c8c 100644
--- a/src/gui/util/qsystemtrayicon_mac.mm
+++ b/src/gui/util/qsystemtrayicon_mac.mm
@@ -529,7 +529,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];