QMdiSubWindow: Hide "system" menu icons on macOS

Not only they should not appear (icons in menus is a special
thing on macOS), they don't match the look on the window frame
buttons. So, it's better to hide them completely.

Change-Id: I8814ed3e128480abff4f53fdd40a0bb13f1796ef
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
bb10
Gabriel de Dietrich 2018-01-26 14:29:06 -08:00
parent 8633e1a7b4
commit 347cfa00a2
1 changed files with 7 additions and 0 deletions

View File

@ -1986,6 +1986,13 @@ void QMdiSubWindowPrivate::updateActions()
for (int i = 0; i < NumWindowStateActions; ++i)
setVisible(WindowStateAction(i), false);
#ifdef Q_OS_MACOS
if (q_func()->style()->inherits("QMacStyle"))
for (int i = 0; i < NumWindowStateActions; ++i)
if (QAction *action = actions[i])
action->setIconVisibleInMenu(false);
#endif
if (windowFlags & Qt::FramelessWindowHint)
return;