Qt: Add standard shortcut to open settings (#3608)

That is "⌘ ," on macOS.

Also fix a couple of menu roles.
This commit is contained in:
Davide Pesavento
2025-11-03 22:44:18 -05:00
committed by GitHub
parent e91db67c79
commit a1889a20bb
3 changed files with 10 additions and 2 deletions

View File

@@ -1957,6 +1957,7 @@ void MainWindow::setupAdditionalUi()
new QShortcut(QKeySequence::ZoomIn, this, this, &MainWindow::onViewZoomInActionTriggered);
m_shortcuts.game_list_zoom_out =
new QShortcut(QKeySequence::ZoomOut, this, this, &MainWindow::onViewZoomOutActionTriggered);
m_shortcuts.settings = new QShortcut(QKeySequence::Preferences, this, [this] { doSettings(); });
s_disable_window_rounded_corners = Host::GetBaseBoolSettingValue("Main", "DisableWindowRoundedCorners", false);
if (s_disable_window_rounded_corners)

View File

@@ -339,6 +339,7 @@ private:
QShortcut* game_list_search = nullptr;
QShortcut* game_list_zoom_in = nullptr;
QShortcut* game_list_zoom_out = nullptr;
QShortcut* settings = nullptr;
} m_shortcuts;
SettingsWindow* m_settings_window = nullptr;

View File

@@ -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">
@@ -576,6 +576,9 @@
<property name="toolTip">
<string>Displays copyright and license notices for Qt.</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::AboutQtRole</enum>
</property>
</action>
<action name="actionAbout">
<property name="icon">
@@ -588,6 +591,9 @@
<property name="toolTip">
<string>Displays copyright and license notices for the application.</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::AboutRole</enum>
</property>
</action>
<action name="actionChangeDisc">
<property name="icon">
@@ -713,7 +719,7 @@
<string>Opens the settings window.</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::PreferencesRole</enum>
<enum>QAction::MenuRole::NoRole</enum>
</property>
</action>
<action name="actionChangeDiscFromFile">