PICARD-1312: Enable mnemonics for buttons and other UI elements on macOS

On macOS mnemonics are disabled by default. But this also means that many UI elements (e.g. triggering buttons in dialogs) cannot be used with keyboard only as it is possible on other platforms. Enabling this on macOS allows better keyboard navigation for all users consistent across platforms.
This commit is contained in:
Philipp Wolfer
2019-12-06 12:45:07 +01:00
committed by Philipp Wolfer
parent aa49c4499c
commit cf4e683119

View File

@@ -904,6 +904,9 @@ def main(localedir=None, autoupdate=True):
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps)
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)
# Enable mnemonics on all platforms, even macOS
QtGui.qt_set_sequence_auto_mnemonic(True)
signal.signal(signal.SIGINT, signal.SIG_DFL)
picard_args, unparsed_args = process_picard_args()