Commit 45216d5c authored by Eike Ziller's avatar Eike Ziller

macOS: Fix that some actions still had icon in menu

For example when toolbars showed a menu for actions that no longer fit
(e.g. open diff viewer, reduce window size until the synchronize and
switch view buttons vanish).

Use the application flag to disable icons in menus on macOS globally
instead of doing that individually on the actions.

Change-Id: I3b682f48ee0e866f0f0d5bb0834690937f427d7f
Reviewed-by: Alessandro Portale's avatarAlessandro Portale <alessandro.portale@qt.io>
parent 37076e8c
......@@ -163,6 +163,8 @@ ActionManager::ActionManager(QObject *parent)
{
m_instance = this;
d = new ActionManagerPrivate;
if (Utils::HostOsInfo::isMacHost())
QCoreApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
}
/*!
......
......@@ -306,8 +306,6 @@ static QString msgActionWarning(QAction *newAction, Id id, QAction *oldAction)
void Action::addOverrideAction(QAction *action, const Context &context, bool scriptable)
{
if (Utils::HostOsInfo::isMacHost())
action->setIconVisibleInMenu(false);
// disallow TextHeuristic menu role, because it doesn't work with translations,
// e.g. QTCREATORBUG-13101
if (action->menuRole() == QAction::TextHeuristicRole)
......
......@@ -159,12 +159,6 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_forwardButton->setDefaultAction(d->m_goForwardAction);
if (Utils::HostOsInfo::isMacHost()) {
d->m_horizontalSplitAction->setIconVisibleInMenu(false);
d->m_verticalSplitAction->setIconVisibleInMenu(false);
d->m_splitNewWindowAction->setIconVisibleInMenu(false);
}
d->m_splitButton->setIcon(Utils::Icons::SPLIT_HORIZONTAL_TOOLBAR.icon());
d->m_splitButton->setToolTip(tr("Split"));
d->m_splitButton->setPopupMode(QToolButton::InstantPopup);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment