Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/gui/GuiApplication.cpp
Original file line number Diff line number Diff line change
@@ -75,6 +75,10 @@ GuiApplication::GuiApplication()
QApplication::setPalette( *lpal );
LmmsStyle::s_palette = lpal;

#ifdef LMMS_BUILD_APPLE
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus, true);
#endif

// Show splash screen
QSplashScreen splashScreen( embed::getIconPixmap( "splash" ) );
splashScreen.show();
12 changes: 12 additions & 0 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
@@ -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
}
}