diff main/MainWindow.cpp @ 1461:0a145f215a45 3.0-integration

Fix to removal of icons from menus on the Mac
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 03 Jan 2017 14:32:53 +0000
parents 96057b1185cb
children f5180edc5dda
line wrap: on
line diff
--- a/main/MainWindow.cpp	Tue Jan 03 13:30:47 2017 +0000
+++ b/main/MainWindow.cpp	Tue Jan 03 14:32:53 2017 +0000
@@ -279,6 +279,12 @@
 
     frame->setLayout(layout);
 
+#ifdef Q_OS_MAC
+    // Mac doesn't align menu labels when icons are shown: result is messy
+    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
+    setIconsVisibleInMenus(false);
+#endif
+
     setupMenus();
     setupToolbars();
     setupHelpMenu();
@@ -353,11 +359,6 @@
 {
     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