diff options
author | bunnei <bunneidev@gmail.com> | 2017-07-17 21:30:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 21:30:01 -0400 |
commit | 822e8d21ea9fd080a76fa939494c14c9bd2f3e27 (patch) | |
tree | 4d318f30937d9e1091dbd2a3c90920594dbd2081 /src/citra_qt/configuration/configure_general.cpp | |
parent | 924215a41fc3b1cfe16ae622a14a4bc856b5972e (diff) | |
parent | 74cf73f9d3cdfbca658f8132408eccad710a798c (diff) |
Merge pull request #2804 from Kloen/theming
citra-qt: UI Themes
Diffstat (limited to 'src/citra_qt/configuration/configure_general.cpp')
-rw-r--r-- | src/citra_qt/configuration/configure_general.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/citra_qt/configuration/configure_general.cpp b/src/citra_qt/configuration/configure_general.cpp index a21176c34..939379717 100644 --- a/src/citra_qt/configuration/configure_general.cpp +++ b/src/citra_qt/configuration/configure_general.cpp @@ -12,6 +12,11 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureGeneral) { ui->setupUi(this); + + for (auto theme : UISettings::themes) { + ui->theme_combobox->addItem(theme.first, theme.second); + } + this->setConfiguration(); ui->toggle_cpu_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn()); @@ -26,11 +31,15 @@ void ConfigureGeneral::setConfiguration() { // The first item is "auto-select" with actual value -1, so plus one here will do the trick ui->region_combobox->setCurrentIndex(Settings::values.region_value + 1); + + ui->theme_combobox->setCurrentIndex(ui->theme_combobox->findData(UISettings::values.theme)); } void ConfigureGeneral::applyConfiguration() { UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked(); UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); + UISettings::values.theme = + ui->theme_combobox->itemData(ui->theme_combobox->currentIndex()).toString(); Settings::values.region_value = ui->region_combobox->currentIndex() - 1; Settings::values.use_cpu_jit = ui->toggle_cpu_jit->isChecked(); Settings::Apply(); |