Mercurial > hg > sonic-visualiser
diff main/MainWindow.cpp @ 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 | e4f223fc9099 |
children | 8ca62b402846 0a145f215a45 |
line wrap: on
line diff
--- 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) {