# HG changeset patch # User Chris Cannam # Date 1483453973 0 # Node ID 0a145f215a4547fba361bdada3a5ae51a98fd219 # Parent 9a3684f1393b07cd49f878c958de04a2eb989711 Fix to removal of icons from menus on the Mac diff -r 9a3684f1393b -r 0a145f215a45 main/MainWindow.cpp --- 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