From 1cdd4e01fb4e415c23861de8b78f6fb76c682cb4 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 24 Jan 2020 14:50:51 +1000 Subject: [PATCH] Qt: Reorder settings categories --- src/duckstation-qt/mainwindow.cpp | 4 ++++ src/duckstation-qt/mainwindow.ui | 2 +- src/duckstation-qt/settingsdialog.cpp | 8 ++++---- src/duckstation-qt/settingsdialog.h | 4 ++-- src/duckstation-qt/settingsdialog.ui | 18 +++++++++--------- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 008668785..d5723f3e4 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -280,8 +280,12 @@ void MainWindow::connectSignals() connect(m_ui.actionExit, &QAction::triggered, this, &MainWindow::onExitActionTriggered); connect(m_ui.actionFullscreen, &QAction::triggered, this, &MainWindow::toggleFullscreen); connect(m_ui.actionSettings, &QAction::triggered, [this]() { doSettings(SettingsDialog::Category::Count); }); + connect(m_ui.actionConsoleSettings, &QAction::triggered, + [this]() { doSettings(SettingsDialog::Category::ConsoleSettings); }); connect(m_ui.actionGameListSettings, &QAction::triggered, [this]() { doSettings(SettingsDialog::Category::GameListSettings); }); + connect(m_ui.actionHotkeySettings, &QAction::triggered, + [this]() { doSettings(SettingsDialog::Category::HotkeySettings); }); connect(m_ui.actionPortSettings, &QAction::triggered, [this]() { doSettings(SettingsDialog::Category::PortSettings); }); connect(m_ui.actionGPUSettings, &QAction::triggered, [this]() { doSettings(SettingsDialog::Category::GPUSettings); }); diff --git a/src/duckstation-qt/mainwindow.ui b/src/duckstation-qt/mainwindow.ui index d1343e18c..ac2883e18 100644 --- a/src/duckstation-qt/mainwindow.ui +++ b/src/duckstation-qt/mainwindow.ui @@ -85,9 +85,9 @@ + - diff --git a/src/duckstation-qt/settingsdialog.cpp b/src/duckstation-qt/settingsdialog.cpp index 5b3d91039..012afa9b9 100644 --- a/src/duckstation-qt/settingsdialog.cpp +++ b/src/duckstation-qt/settingsdialog.cpp @@ -12,16 +12,16 @@ SettingsDialog::SettingsDialog(QtHostInterface* host_interface, QWidget* parent { m_ui.setupUi(this); + m_console_settings = new ConsoleSettingsWidget(host_interface, m_ui.settingsContainer); m_game_list_settings = new GameListSettingsWidget(host_interface, m_ui.settingsContainer); m_hotkey_settings = new HotkeySettingsWidget(host_interface, m_ui.settingsContainer); - m_console_settings = new ConsoleSettingsWidget(host_interface, m_ui.settingsContainer); m_port_settings = new PortSettingsWidget(host_interface, m_ui.settingsContainer); m_gpu_settings = new GPUSettingsWidget(host_interface, m_ui.settingsContainer); m_audio_settings = new QWidget(m_ui.settingsContainer); - m_ui.settingsContainer->insertWidget(0, m_game_list_settings); - m_ui.settingsContainer->insertWidget(1, m_hotkey_settings); - m_ui.settingsContainer->insertWidget(2, m_console_settings); + m_ui.settingsContainer->insertWidget(0, m_console_settings); + m_ui.settingsContainer->insertWidget(1, m_game_list_settings); + m_ui.settingsContainer->insertWidget(2, m_hotkey_settings); m_ui.settingsContainer->insertWidget(3, m_port_settings); m_ui.settingsContainer->insertWidget(4, m_gpu_settings); m_ui.settingsContainer->insertWidget(5, m_audio_settings); diff --git a/src/duckstation-qt/settingsdialog.h b/src/duckstation-qt/settingsdialog.h index b70b75d40..167e46168 100644 --- a/src/duckstation-qt/settingsdialog.h +++ b/src/duckstation-qt/settingsdialog.h @@ -18,9 +18,9 @@ class SettingsDialog : public QDialog public: enum class Category { + ConsoleSettings, GameListSettings, HotkeySettings, - ConsoleSettings, PortSettings, GPUSettings, AudioSettings, @@ -41,9 +41,9 @@ private: QtHostInterface* m_host_interface; + ConsoleSettingsWidget* m_console_settings = nullptr; GameListSettingsWidget* m_game_list_settings = nullptr; HotkeySettingsWidget* m_hotkey_settings = nullptr; - ConsoleSettingsWidget* m_console_settings = nullptr; PortSettingsWidget* m_port_settings = nullptr; GPUSettingsWidget* m_gpu_settings = nullptr; QWidget* m_audio_settings = nullptr; diff --git a/src/duckstation-qt/settingsdialog.ui b/src/duckstation-qt/settingsdialog.ui index ea56c1549..565f36663 100644 --- a/src/duckstation-qt/settingsdialog.ui +++ b/src/duckstation-qt/settingsdialog.ui @@ -40,6 +40,15 @@ 32 + + + Console Settings + + + + :/icons/utilities-system-monitor.png:/icons/utilities-system-monitor.png + + Game List Settings @@ -58,15 +67,6 @@ :/icons/applications-other.png:/icons/applications-other.png - - - Console Settings - - - - :/icons/utilities-system-monitor.png:/icons/utilities-system-monitor.png - - Port Settings