mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-28 22:30:11 +00:00
Qt: Use standard key sequences for main window shortcuts
Notably, this enables command+R to refresh on macOS, where F5 is not commonly used.
This commit is contained in:
parent
e45c04e0dd
commit
36b869003a
@ -1689,15 +1689,17 @@ void MainWindow::setupAdditionalUi()
|
||||
updateDebugMenuVisibility();
|
||||
|
||||
m_shortcuts.open_file =
|
||||
new QShortcut(Qt::ControlModifier | Qt::Key_O, this, this, &MainWindow::onStartFileActionTriggered);
|
||||
m_shortcuts.game_list_refresh = new QShortcut(Qt::Key_F5, this, this, &MainWindow::onScanForNewGamesTriggered);
|
||||
new QShortcut(QKeySequence::Open, this, this, &MainWindow::onStartFileActionTriggered);
|
||||
m_shortcuts.game_list_refresh =
|
||||
new QShortcut(QKeySequence::Refresh, this, this, &MainWindow::onScanForNewGamesTriggered);
|
||||
m_shortcuts.game_list_search = new QShortcut(this);
|
||||
m_shortcuts.game_list_search->setKeys({Qt::ControlModifier | Qt::Key_F, Qt::Key_F3});
|
||||
m_shortcuts.game_list_search->setKeys(
|
||||
QKeySequence::keyBindings(QKeySequence::Find) + QKeySequence::keyBindings(QKeySequence::FindNext));
|
||||
connect(m_shortcuts.game_list_search, &QShortcut::activated, m_game_list_widget, &GameListWidget::focusSearchWidget);
|
||||
m_shortcuts.game_grid_zoom_in =
|
||||
new QShortcut(Qt::ControlModifier | Qt::Key_Plus, this, this, &MainWindow::onViewGameGridZoomInActionTriggered);
|
||||
new QShortcut(QKeySequence::ZoomIn, this, this, &MainWindow::onViewGameGridZoomInActionTriggered);
|
||||
m_shortcuts.game_grid_zoom_out =
|
||||
new QShortcut(Qt::ControlModifier | Qt::Key_Minus, this, this, &MainWindow::onViewGameGridZoomOutActionTriggered);
|
||||
new QShortcut(QKeySequence::ZoomOut, this, this, &MainWindow::onViewGameGridZoomOutActionTriggered);
|
||||
|
||||
s_disable_window_rounded_corners = Host::GetBaseBoolSettingValue("Main", "DisableWindowRoundedCorners", false);
|
||||
if (s_disable_window_rounded_corners)
|
||||
|
@ -30,7 +30,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>33</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuSystem">
|
||||
@ -721,7 +721,7 @@
|
||||
<string>Resume</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Resumes the last save state created.</string>
|
||||
<string>Resumes the last save state created</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionViewToolbar">
|
||||
|
Loading…
x
Reference in New Issue
Block a user