changeset 1458:96057b1185cb 3.0-integration

Don't show icons on menus in OSX
author Chris Cannam
date Tue, 03 Jan 2017 13:05:02 +0000
parents c73d90d378ac
children 9a3684f1393b
files .hgsubstate main/MainWindow.cpp
diffstat 2 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Tue Jan 03 13:04:35 2017 +0000
+++ b/.hgsubstate	Tue Jan 03 13:05:02 2017 +0000
@@ -8,6 +8,6 @@
 3257ddb6fff110cc88f3ffeaeefa0f29d5eb3b6f piper-cpp
 5f67a29f0fc7f1b908f7cde4866173a7af337862 sv-dependency-builds
 022d6a9e6d75f77a693d31765faead2e578cf014 svapp
-4cd64fc573f3946bdd7fd3b3f49e72411e5384c0 svcore
+47768571681e9ef5a14dbfd066b7a1510580c53e svcore
 67f437277069ed83664691fc179421fdbfe9ad70 svgui
 0eebd22a081a824067bf3d5de65326696feab653 vamp-plugin-sdk
--- a/main/MainWindow.cpp	Tue Jan 03 13:04:35 2017 +0000
+++ b/main/MainWindow.cpp	Tue Jan 03 13:05:02 2017 +0000
@@ -353,6 +353,11 @@
 {
     if (!m_mainMenusCreated) {
 
+#ifdef Q_OS_MAC
+        // Mac doesn't align menu labels when icons are shown: result is messy
+        QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
+#endif
+
 #ifdef Q_OS_LINUX
         // In Ubuntu 14.04 the window's menu bar goes missing entirely
         // if the user is running any desktop environment other than Unity
@@ -362,16 +367,15 @@
         // the system menubar integration altogether. Like this:
 	menuBar()->setNativeMenuBar(false);  // fix #1039
 #endif
-
+        
         m_rightButtonMenu = new QMenu();
 
-        // No -- we don't want tear-off enabled on the right-button
-        // menu.  If it is enabled, then simply right-clicking and
-        // releasing will pop up the menu, activate the tear-off, and
-        // leave the torn-off menu window in front of the main window.
-        // That isn't desirable.  I'm not sure it ever would be, in a
-        // context menu -- perhaps technically a Qt bug?
-//        m_rightButtonMenu->setTearOffEnabled(true);
+        // We don't want tear-off enabled on the right-button menu.
+        // If it is enabled, then simply right-clicking and releasing
+        // will pop up the menu, activate the tear-off, and leave the
+        // torn-off menu window in front of the main window.  That
+        // isn't desirable.
+        m_rightButtonMenu->setTearOffEnabled(false);
     }
 
     if (m_rightButtonTransformsMenu) {