summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-03 01:24:40 +0200
committerLioncash <mathew1800@gmail.com>2018-10-03 01:24:43 +0200
commit8f5e2a2b835541c0c6f41ed9e49cf58e41e6c064 (patch)
treeff60cff4112b075aa51844fb374700251ac3ffd0
parentMerge pull request #1330 from raven02/tlds (diff)
downloadyuzu-8f5e2a2b835541c0c6f41ed9e49cf58e41e6c064.tar
yuzu-8f5e2a2b835541c0c6f41ed9e49cf58e41e6c064.tar.gz
yuzu-8f5e2a2b835541c0c6f41ed9e49cf58e41e6c064.tar.bz2
yuzu-8f5e2a2b835541c0c6f41ed9e49cf58e41e6c064.tar.lz
yuzu-8f5e2a2b835541c0c6f41ed9e49cf58e41e6c064.tar.xz
yuzu-8f5e2a2b835541c0c6f41ed9e49cf58e41e6c064.tar.zst
yuzu-8f5e2a2b835541c0c6f41ed9e49cf58e41e6c064.zip
-rw-r--r--src/yuzu/configuration/configure_graphics.cpp44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp
index 839d58f59..cd1549462 100644
--- a/src/yuzu/configuration/configure_graphics.cpp
+++ b/src/yuzu/configuration/configure_graphics.cpp
@@ -8,27 +8,7 @@
#include "ui_configure_graphics.h"
#include "yuzu/configuration/configure_graphics.h"
-ConfigureGraphics::ConfigureGraphics(QWidget* parent)
- : QWidget(parent), ui(new Ui::ConfigureGraphics) {
-
- ui->setupUi(this);
- this->setConfiguration();
-
- ui->frame_limit->setEnabled(Settings::values.use_frame_limit);
- connect(ui->toggle_frame_limit, &QCheckBox::stateChanged, 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())
- return;
- bg_color = new_bg_color;
- ui->bg_button->setStyleSheet(
- QString("QPushButton { background-color: %1 }").arg(bg_color.name()));
- });
-}
-
-ConfigureGraphics::~ConfigureGraphics() = default;
-
+namespace {
enum class Resolution : int {
Auto,
Scale1x,
@@ -67,6 +47,28 @@ Resolution FromResolutionFactor(float factor) {
}
return Resolution::Auto;
}
+} // Anonymous namespace
+
+ConfigureGraphics::ConfigureGraphics(QWidget* parent)
+ : QWidget(parent), ui(new Ui::ConfigureGraphics) {
+
+ ui->setupUi(this);
+ this->setConfiguration();
+
+ ui->frame_limit->setEnabled(Settings::values.use_frame_limit);
+ connect(ui->toggle_frame_limit, &QCheckBox::stateChanged, 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())
+ return;
+ bg_color = new_bg_color;
+ ui->bg_button->setStyleSheet(
+ QString("QPushButton { background-color: %1 }").arg(bg_color.name()));
+ });
+}
+
+ConfigureGraphics::~ConfigureGraphics() = default;
void ConfigureGraphics::setConfiguration() {
ui->resolution_factor_combobox->setCurrentIndex(