diff options
author | Zach Hilman <DarkLordZach@users.noreply.github.com> | 2019-06-05 21:26:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-05 21:26:13 +0200 |
commit | 6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e (patch) | |
tree | 8462e3b669dbb8d40a4ebcad4fc70a4cb9dc8a63 | |
parent | Merge pull request #2532 from ShalokShalom/patch-2 (diff) | |
parent | yuzu/configuration/configure_graphics: Eliminate type narrowing in a connect call (diff) | |
download | yuzu-6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e.tar yuzu-6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e.tar.gz yuzu-6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e.tar.bz2 yuzu-6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e.tar.lz yuzu-6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e.tar.xz yuzu-6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e.tar.zst yuzu-6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e.zip |
-rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 08ea41b0f..6daf82ab1 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -51,17 +51,15 @@ Resolution FromResolutionFactor(float factor) { ConfigureGraphics::ConfigureGraphics(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureGraphics) { - ui->setupUi(this); - this->setConfiguration(); + setConfiguration(); - ui->frame_limit->setEnabled(Settings::values.use_frame_limit); - connect(ui->toggle_frame_limit, &QCheckBox::stateChanged, ui->frame_limit, - &QSpinBox::setEnabled); + connect(ui->toggle_frame_limit, &QCheckBox::toggled, ui->frame_limit, &QSpinBox::setEnabled); connect(ui->bg_button, &QPushButton::clicked, this, [this] { const QColor new_bg_color = QColorDialog::getColor(bg_color); - if (!new_bg_color.isValid()) + if (!new_bg_color.isValid()) { return; + } UpdateBackgroundColorButton(new_bg_color); }); } @@ -74,6 +72,7 @@ void ConfigureGraphics::setConfiguration() { ui->resolution_factor_combobox->setCurrentIndex( static_cast<int>(FromResolutionFactor(Settings::values.resolution_factor))); ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit); + ui->frame_limit->setEnabled(ui->toggle_frame_limit->isChecked()); ui->frame_limit->setValue(Settings::values.frame_limit); ui->use_compatibility_profile->setEnabled(runtime_lock); ui->use_compatibility_profile->setChecked(Settings::values.use_compatibility_profile); |