Merge pull request #2953 from CookiePLMonster/move-per-game-settings
Make Game Properties accessible from the toolbar
This commit is contained in:
commit
e87b008e57
|
@ -1555,6 +1555,10 @@ void MainWindow::setupAdditionalUi()
|
||||||
m_status_vps_widget->setFixedSize(125, 16);
|
m_status_vps_widget->setFixedSize(125, 16);
|
||||||
m_status_vps_widget->hide();
|
m_status_vps_widget->hide();
|
||||||
|
|
||||||
|
m_settings_toolbar_menu = new QMenu(m_ui.toolBar);
|
||||||
|
m_settings_toolbar_menu->addAction(m_ui.actionSettings);
|
||||||
|
m_settings_toolbar_menu->addAction(m_ui.actionViewGameProperties);
|
||||||
|
|
||||||
m_ui.actionGridViewShowTitles->setChecked(m_game_list_widget->getShowGridCoverTitles());
|
m_ui.actionGridViewShowTitles->setChecked(m_game_list_widget->getShowGridCoverTitles());
|
||||||
|
|
||||||
updateDebugMenuVisibility();
|
updateDebugMenuVisibility();
|
||||||
|
@ -1943,6 +1947,7 @@ void MainWindow::connectSignals()
|
||||||
connect(m_ui.actionExit, &QAction::triggered, this, &MainWindow::close);
|
connect(m_ui.actionExit, &QAction::triggered, this, &MainWindow::close);
|
||||||
connect(m_ui.actionFullscreen, &QAction::triggered, g_emu_thread, &EmuThread::toggleFullscreen);
|
connect(m_ui.actionFullscreen, &QAction::triggered, g_emu_thread, &EmuThread::toggleFullscreen);
|
||||||
connect(m_ui.actionSettings, &QAction::triggered, [this]() { doSettings(); });
|
connect(m_ui.actionSettings, &QAction::triggered, [this]() { doSettings(); });
|
||||||
|
connect(m_ui.actionSettings2, &QAction::triggered, this, &MainWindow::onSettingsTriggeredFromToolbar);
|
||||||
connect(m_ui.actionGeneralSettings, &QAction::triggered, [this]() { doSettings("General"); });
|
connect(m_ui.actionGeneralSettings, &QAction::triggered, [this]() { doSettings("General"); });
|
||||||
connect(m_ui.actionBIOSSettings, &QAction::triggered, [this]() { doSettings("BIOS"); });
|
connect(m_ui.actionBIOSSettings, &QAction::triggered, [this]() { doSettings("BIOS"); });
|
||||||
connect(m_ui.actionConsoleSettings, &QAction::triggered, [this]() { doSettings("Console"); });
|
connect(m_ui.actionConsoleSettings, &QAction::triggered, [this]() { doSettings("Console"); });
|
||||||
|
@ -2750,6 +2755,18 @@ void MainWindow::onToolsOpenDataDirectoryTriggered()
|
||||||
QtUtils::OpenURL(this, QUrl::fromLocalFile(QString::fromStdString(EmuFolders::DataRoot)));
|
QtUtils::OpenURL(this, QUrl::fromLocalFile(QString::fromStdString(EmuFolders::DataRoot)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::onSettingsTriggeredFromToolbar()
|
||||||
|
{
|
||||||
|
if (s_system_valid)
|
||||||
|
{
|
||||||
|
m_settings_toolbar_menu->exec(QCursor::pos());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
doSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::checkForUpdates(bool display_message)
|
void MainWindow::checkForUpdates(bool display_message)
|
||||||
{
|
{
|
||||||
if (!AutoUpdaterDialog::isSupported())
|
if (!AutoUpdaterDialog::isSupported())
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <QtCore/QThread>
|
#include <QtCore/QThread>
|
||||||
#include <QtWidgets/QLabel>
|
#include <QtWidgets/QLabel>
|
||||||
#include <QtWidgets/QMainWindow>
|
#include <QtWidgets/QMainWindow>
|
||||||
|
#include <QtWidgets/QMenu>
|
||||||
#include <QtWidgets/QStackedWidget>
|
#include <QtWidgets/QStackedWidget>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
@ -156,6 +157,7 @@ private Q_SLOTS:
|
||||||
void onToolsCoverDownloaderTriggered();
|
void onToolsCoverDownloaderTriggered();
|
||||||
void onToolsCheatManagerTriggered();
|
void onToolsCheatManagerTriggered();
|
||||||
void onToolsOpenDataDirectoryTriggered();
|
void onToolsOpenDataDirectoryTriggered();
|
||||||
|
void onSettingsTriggeredFromToolbar();
|
||||||
|
|
||||||
void onGameListRefreshComplete();
|
void onGameListRefreshComplete();
|
||||||
void onGameListRefreshProgress(const QString& status, int current, int total);
|
void onGameListRefreshProgress(const QString& status, int current, int total);
|
||||||
|
@ -264,6 +266,8 @@ private:
|
||||||
QLabel* m_status_vps_widget = nullptr;
|
QLabel* m_status_vps_widget = nullptr;
|
||||||
QLabel* m_status_resolution_widget = nullptr;
|
QLabel* m_status_resolution_widget = nullptr;
|
||||||
|
|
||||||
|
QMenu* m_settings_toolbar_menu = nullptr;
|
||||||
|
|
||||||
SettingsDialog* m_settings_dialog = nullptr;
|
SettingsDialog* m_settings_dialog = nullptr;
|
||||||
ControllerSettingsDialog* m_controller_settings_dialog = nullptr;
|
ControllerSettingsDialog* m_controller_settings_dialog = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,7 @@
|
||||||
<normaloff>.</normaloff>.</iconset>
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<addaction name="actionViewGameProperties"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionGeneralSettings"/>
|
<addaction name="actionGeneralSettings"/>
|
||||||
<addaction name="actionGameListSettings"/>
|
<addaction name="actionGameListSettings"/>
|
||||||
|
@ -216,7 +217,6 @@
|
||||||
<addaction name="actionViewGameList"/>
|
<addaction name="actionViewGameList"/>
|
||||||
<addaction name="actionViewGameGrid"/>
|
<addaction name="actionViewGameGrid"/>
|
||||||
<addaction name="actionViewSystemDisplay"/>
|
<addaction name="actionViewSystemDisplay"/>
|
||||||
<addaction name="actionViewGameProperties"/>
|
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionFullscreen"/>
|
<addaction name="actionFullscreen"/>
|
||||||
<addaction name="menuWindowSize"/>
|
<addaction name="menuWindowSize"/>
|
||||||
|
@ -277,7 +277,7 @@
|
||||||
<addaction name="actionSaveState"/>
|
<addaction name="actionSaveState"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionFullscreen"/>
|
<addaction name="actionFullscreen"/>
|
||||||
<addaction name="actionSettings"/>
|
<addaction name="actionSettings2"/>
|
||||||
<addaction name="actionControllerSettings"/>
|
<addaction name="actionControllerSettings"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusBar"/>
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
|
@ -610,7 +610,22 @@
|
||||||
<normaloff>.</normaloff>.</iconset>
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Settings...</string>
|
<string>&Settings</string>
|
||||||
|
</property>
|
||||||
|
<property name="menuRole">
|
||||||
|
<enum>QAction::PreferencesRole</enum>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionSettings2">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="settings-3-line">
|
||||||
|
<normaloff>.</normaloff>.</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Settings</string>
|
||||||
|
</property>
|
||||||
|
<property name="menuRole">
|
||||||
|
<enum>QAction::PreferencesRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionChangeDiscFromFile">
|
<action name="actionChangeDiscFromFile">
|
||||||
|
@ -846,6 +861,10 @@
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="file-settings-line">
|
||||||
|
<normaloff>.</normaloff>.</iconset>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Game &Properties</string>
|
<string>Game &Properties</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in New Issue