diff options
| author | 2017-06-24 02:41:48 +0200 | |
|---|---|---|
| committer | 2017-06-24 05:48:43 +0200 | |
| commit | 74cf73f9d3cdfbca658f8132408eccad710a798c (patch) | |
| tree | e0224645af3977c8e2d710538475162f003d1439 | |
| parent | citra-qt: load ui theme at startup and config change. (diff) | |
| download | yuzu-74cf73f9d3cdfbca658f8132408eccad710a798c.tar.gz yuzu-74cf73f9d3cdfbca658f8132408eccad710a798c.tar.xz yuzu-74cf73f9d3cdfbca658f8132408eccad710a798c.zip | |
citra-qt: Add option to configure the UI theme
Diffstat (limited to '')
| -rw-r--r-- | src/citra_qt/configuration/configure_general.cpp | 9 | ||||
| -rw-r--r-- | src/citra_qt/configuration/configure_general.ui | 28 |
2 files changed, 37 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) | |||
| 12 | : QWidget(parent), ui(new Ui::ConfigureGeneral) { | 12 | : QWidget(parent), ui(new Ui::ConfigureGeneral) { |
| 13 | 13 | ||
| 14 | ui->setupUi(this); | 14 | ui->setupUi(this); |
| 15 | |||
| 16 | for (auto theme : UISettings::themes) { | ||
| 17 | ui->theme_combobox->addItem(theme.first, theme.second); | ||
| 18 | } | ||
| 19 | |||
| 15 | this->setConfiguration(); | 20 | this->setConfiguration(); |
| 16 | 21 | ||
| 17 | ui->toggle_cpu_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 22 | ui->toggle_cpu_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn()); |
| @@ -26,11 +31,15 @@ void ConfigureGeneral::setConfiguration() { | |||
| 26 | 31 | ||
| 27 | // The first item is "auto-select" with actual value -1, so plus one here will do the trick | 32 | // The first item is "auto-select" with actual value -1, so plus one here will do the trick |
| 28 | ui->region_combobox->setCurrentIndex(Settings::values.region_value + 1); | 33 | ui->region_combobox->setCurrentIndex(Settings::values.region_value + 1); |
| 34 | |||
| 35 | ui->theme_combobox->setCurrentIndex(ui->theme_combobox->findData(UISettings::values.theme)); | ||
| 29 | } | 36 | } |
| 30 | 37 | ||
| 31 | void ConfigureGeneral::applyConfiguration() { | 38 | void ConfigureGeneral::applyConfiguration() { |
| 32 | UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked(); | 39 | UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked(); |
| 33 | UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); | 40 | UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); |
| 41 | UISettings::values.theme = | ||
| 42 | ui->theme_combobox->itemData(ui->theme_combobox->currentIndex()).toString(); | ||
| 34 | Settings::values.region_value = ui->region_combobox->currentIndex() - 1; | 43 | Settings::values.region_value = ui->region_combobox->currentIndex() - 1; |
| 35 | Settings::values.use_cpu_jit = ui->toggle_cpu_jit->isChecked(); | 44 | Settings::values.use_cpu_jit = ui->toggle_cpu_jit->isChecked(); |
| 36 | Settings::Apply(); | 45 | Settings::Apply(); |
diff --git a/src/citra_qt/configuration/configure_general.ui b/src/citra_qt/configuration/configure_general.ui index c739605a4..eedf2cbb0 100644 --- a/src/citra_qt/configuration/configure_general.ui +++ b/src/citra_qt/configuration/configure_general.ui | |||
| @@ -132,6 +132,34 @@ | |||
| 132 | </widget> | 132 | </widget> |
| 133 | </item> | 133 | </item> |
| 134 | <item> | 134 | <item> |
| 135 | <widget class="QGroupBox" name="theme_group_box"> | ||
| 136 | <property name="title"> | ||
| 137 | <string>Theme</string> | ||
| 138 | </property> | ||
| 139 | <layout class="QHBoxLayout" name="theme_qhbox_layout"> | ||
| 140 | <item> | ||
| 141 | <layout class="QVBoxLayout" name="theme_qvbox_layout"> | ||
| 142 | <item> | ||
| 143 | <layout class="QHBoxLayout" name="theme_qhbox_layout_2"> | ||
| 144 | <item> | ||
| 145 | <widget class="QLabel" name="theme_label"> | ||
| 146 | <property name="text"> | ||
| 147 | <string>Theme:</string> | ||
| 148 | </property> | ||
| 149 | </widget> | ||
| 150 | </item> | ||
| 151 | <item> | ||
| 152 | <widget class="QComboBox" name="theme_combobox"> | ||
| 153 | </widget> | ||
| 154 | </item> | ||
| 155 | </layout> | ||
| 156 | </item> | ||
| 157 | </layout> | ||
| 158 | </item> | ||
| 159 | </layout> | ||
| 160 | </widget> | ||
| 161 | </item> | ||
| 162 | <item> | ||
| 135 | <widget class="QGroupBox" name="groupBox_3"> | 163 | <widget class="QGroupBox" name="groupBox_3"> |
| 136 | <property name="title"> | 164 | <property name="title"> |
| 137 | <string>Hotkeys</string> | 165 | <string>Hotkeys</string> |