Qt: Add a context menu to the toolbar's Settings button when the game is running

A new small context menu that allows to select between global settings
and game settings.
This commit is contained in:
Silent
2023-02-28 19:53:31 +01:00
parent f34b17446c
commit 6f0280afc2
3 changed files with 38 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
#include <QtCore/QThread>
#include <QtWidgets/QLabel>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMenu>
#include <QtWidgets/QStackedWidget>
#include <memory>
#include <optional>
@@ -156,6 +157,7 @@ private Q_SLOTS:
void onToolsCoverDownloaderTriggered();
void onToolsCheatManagerTriggered();
void onToolsOpenDataDirectoryTriggered();
void onSettingsTriggeredFromToolbar();
void onGameListRefreshComplete();
void onGameListRefreshProgress(const QString& status, int current, int total);
@@ -264,6 +266,8 @@ private:
QLabel* m_status_vps_widget = nullptr;
QLabel* m_status_resolution_widget = nullptr;
QMenu* m_settings_toolbar_menu = nullptr;
SettingsDialog* m_settings_dialog = nullptr;
ControllerSettingsDialog* m_controller_settings_dialog = nullptr;