Remove non-document menu icons on macOS / OS X (#3363)

Remove icons from non-document menus on macOS

Matches Apple user interface guidelines
This commit is contained in:
follower
2017-02-17 19:48:27 +13:00
committed by Tres Finocchiaro
parent 1ff9638968
commit b25655f9fe
2 changed files with 16 additions and 0 deletions

View File

@@ -893,6 +893,10 @@ void MainWindow::updateRecentlyOpenedProjectsMenu()
{
m_recentlyOpenedProjectsMenu->addAction(
embed::getIconPixmap( "project_file" ), *it );
#ifdef LMMS_BUILD_APPLE
m_recentlyOpenedProjectsMenu->actions().last()->setIconVisibleInMenu(false); // QTBUG-44565 workaround
m_recentlyOpenedProjectsMenu->actions().last()->setIconVisibleInMenu(true);
#endif
shownInMenu++;
if( shownInMenu >= 15 )
{
@@ -1482,6 +1486,10 @@ void MainWindow::fillTemplatesMenu()
m_templatesMenu->addAction(
embed::getIconPixmap( "project_file" ),
( *it ).left( ( *it ).length() - 4 ) );
#ifdef LMMS_BUILD_APPLE
m_templatesMenu->actions().last()->setIconVisibleInMenu(false); // QTBUG-44565 workaround
m_templatesMenu->actions().last()->setIconVisibleInMenu(true);
#endif
}
QDir d( ConfigManager::inst()->factoryProjectsDir() + "templates" );
@@ -1499,6 +1507,10 @@ void MainWindow::fillTemplatesMenu()
m_templatesMenu->addAction(
embed::getIconPixmap( "project_file" ),
( *it ).left( ( *it ).length() - 4 ) );
#ifdef LMMS_BUILD_APPLE
m_templatesMenu->actions().last()->setIconVisibleInMenu(false); // QTBUG-44565 workaround
m_templatesMenu->actions().last()->setIconVisibleInMenu(true);
#endif
}
}