diff options
author | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2018-01-26 14:29:06 -0800 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2018-02-05 19:44:57 +0000 |
commit | 347cfa00a247a54bef290478715059e14da0c664 (patch) | |
tree | 8cc3cbbf25661ae5907179cbfebe51f9b360f99c /src/widgets/widgets/qmdisubwindow.cpp | |
parent | 8633e1a7b48f71e91f81ef5c667d6eb7a8db3adb (diff) |
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>
Diffstat (limited to 'src/widgets/widgets/qmdisubwindow.cpp')
-rw-r--r-- | src/widgets/widgets/qmdisubwindow.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp index 0fdeaeb1e6..794674c427 100644 --- a/src/widgets/widgets/qmdisubwindow.cpp +++ b/src/widgets/widgets/qmdisubwindow.cpp @@ -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; |