diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-03-09 10:30:41 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-03-17 09:39:37 +0000 |
commit | ed5e6a499954765548aa674fbfbe4159cfabef89 (patch) | |
tree | f0edd4d4edeb90a9350d5b55233d832639805766 /src/plugins/coreplugin/mainwindow.cpp | |
parent | 0ff5bf75e16f1383967405ad34628a38d6c60768 (diff) | |
download | qt-creator-ed5e6a499954765548aa674fbfbe4159cfabef89.tar.gz |
Add some additional shortcuts for actions
Add Cmd+Shift+- for decreasing font size on macOS.
Do not add Cmd+= for increasing size, because it conflicts with the
existing shortcut for "Replace and Find Next".
Sprinkle some Backspace shortcuts in addition to Delete for removing
items. There are (laptop) keyboards that either do not have a designated
Delete key (requiring Fn+Backspace) or where the Delete key is not
conveniently located/sized, and there is no benefit in making the
distinction in that case anyhow.
Fixes: QTCREATORBUG-706
Fixes: QTCREATORBUG-13733
Change-Id: I06274a9810b82800ec6158a883c95d2a7ae2465e
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/mainwindow.cpp')
-rw-r--r-- | src/plugins/coreplugin/mainwindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 67a3e80635..929d498827 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -645,7 +645,10 @@ void MainWindow::registerDefaultActions() : Utils::Icons::ZOOMOUT_TOOLBAR.icon(); tmpaction = new QAction(icon, tr("Zoom Out"), this); cmd = ActionManager::registerAction(tmpaction, Constants::ZOOM_OUT); - cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+-"))); + if (useMacShortcuts) + cmd->setDefaultKeySequences({QKeySequence(tr("Ctrl+-")), QKeySequence(tr("Ctrl+Shift+-"))}); + else + cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+-"))); tmpaction->setEnabled(false); // Zoom Reset Action |