# HG changeset patch # User Chris Cannam # Date 1483448702 0 # Node ID 96057b1185cb0e432eae9179f24d1362aa41d288 # Parent c73d90d378acf075b0c29d326b9fdef77747d707 Don't show icons on menus in OSX diff -r c73d90d378ac -r 96057b1185cb .hgsubstate --- 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 diff -r c73d90d378ac -r 96057b1185cb main/MainWindow.cpp --- 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) {