Hide multi-keystroke accelerators in Mac menu (bug 12693).

Patch from Juergen.
This commit is contained in:
Pavel Sanda 2023-07-05 20:45:26 +02:00
parent 28a9124241
commit fb43449c80

View File

@ -2111,8 +2111,16 @@ static QString label(MenuItem const & mi)
}
QString const binding = mi.binding();
#if defined(Q_OS_MAC)
// MacOS cannot display complex bindings, so hide those
// https://doc.qt.io/qt-6/macos-issues.html#menu-actions
// #12693
if (!binding.isEmpty() && !binding.contains(" "))
label += '\t' + binding;
#else
if (!binding.isEmpty())
label += '\t' + binding;
#endif
return label;
}