diff options
| author | Dentomologist <dentomologist@gmail.com> | 2025-06-16 21:13:16 -0700 |
|---|---|---|
| committer | Dentomologist <dentomologist@gmail.com> | 2025-06-16 22:56:26 -0700 |
| commit | 2fd74990b7b10c12a5b338aa7d95e5cc8463ca7e (patch) | |
| tree | bcd404ba356db5ea8815b95b4a4d301f5f4ab769 /Source/Core | |
| parent | 6a0d8ca3f8a4a4c98d60473f34bd8e35d0ee9728 (diff) | |
Qt: Use NonAutodismissibleMenu in more places
Use NonAutodismissibleMenu for MenuBar's Options, JIT, and
Tools->"Connect Wii Remotes" menus, as well as for the Tags menu in
GameList's context menu.
NonAutodismissibleMenu allows users to check or uncheck multiple
checkable menu items without closing the menu between selections.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt/GameList/GameList.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/MenuBar.cpp | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/GameList/GameList.cpp b/Source/Core/DolphinQt/GameList/GameList.cpp index b2392e2f2e..c09ca07f52 100644 --- a/Source/Core/DolphinQt/GameList/GameList.cpp +++ b/Source/Core/DolphinQt/GameList/GameList.cpp @@ -66,6 +66,7 @@ #include "DolphinQt/QtUtils/DolphinFileDialog.h" #include "DolphinQt/QtUtils/DoubleClickEventFilter.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" +#include "DolphinQt/QtUtils/NonAutodismissibleMenu.h" #include "DolphinQt/QtUtils/ParallelProgressDialog.h" #include "DolphinQt/Resources.h" #include "DolphinQt/Settings.h" @@ -519,7 +520,8 @@ void GameList::ShowContextMenu(const QPoint&) menu->addSeparator(); - auto* tags_menu = menu->addMenu(tr("Tags")); + auto* const tags_menu{new QtUtils::NonAutodismissibleMenu(tr("Tags"), menu)}; + menu->addMenu(tags_menu); auto path = game->GetFilePath(); auto game_tags = m_model.GetGameTags(path); diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp index 7119af1d70..ead86839cb 100644 --- a/Source/Core/DolphinQt/MenuBar.cpp +++ b/Source/Core/DolphinQt/MenuBar.cpp @@ -352,7 +352,8 @@ void MenuBar::AddToolsMenu() m_export_wii_saves = tools_menu->addAction(tr("Export All Wii Saves"), this, &MenuBar::ExportWiiSaves); - QMenu* connect_wii_remotes_menu = new QMenu(tr("Connect Wii Remotes"), tools_menu); + auto* const connect_wii_remotes_menu{ + new QtUtils::NonAutodismissibleMenu(tr("Connect Wii Remotes"), tools_menu)}; tools_menu->addSeparator(); tools_menu->addMenu(connect_wii_remotes_menu); @@ -601,7 +602,8 @@ void MenuBar::AddViewMenu() void MenuBar::AddOptionsMenu() { - QMenu* options_menu = addMenu(tr("&Options")); + auto* const options_menu{new QtUtils::NonAutodismissibleMenu(tr("&Options"), this)}; + addMenu(options_menu); #if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) options_menu->addAction(tr("Co&nfiguration"), QKeySequence::Preferences, this, &MenuBar::Configure); @@ -892,7 +894,8 @@ void MenuBar::AddMovieMenu() void MenuBar::AddJITMenu() { - m_jit = addMenu(tr("JIT")); + m_jit = new QtUtils::NonAutodismissibleMenu(tr("JIT"), this); + addMenu(m_jit); m_jit_interpreter_core = m_jit->addAction(tr("Interpreter Core")); m_jit_interpreter_core->setCheckable(true); |
