|
|
|
|
@@ -1,8 +1,9 @@
|
|
|
|
|
// Copyright 2019 Citra Emulator Project
|
|
|
|
|
// Copyright Citra Emulator Project / Lime3DS Emulator Project
|
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
|
#include <QColorDialog>
|
|
|
|
|
#include <QtGlobal>
|
|
|
|
|
#include "citra_qt/configuration/configuration_shared.h"
|
|
|
|
|
#include "citra_qt/configuration/configure_layout.h"
|
|
|
|
|
#include "common/settings.h"
|
|
|
|
|
@@ -57,6 +58,8 @@ ConfigureLayout::ConfigureLayout(QWidget* parent)
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
ui->screen_top_leftright_padding->setEnabled(Settings::values.screen_top_stretch.GetValue());
|
|
|
|
|
|
|
|
|
|
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
|
|
|
|
|
connect(ui->screen_top_stretch, static_cast<void (QCheckBox::*)(int)>(&QCheckBox::stateChanged),
|
|
|
|
|
this,
|
|
|
|
|
[this](bool checkState) { ui->screen_top_leftright_padding->setEnabled(checkState); });
|
|
|
|
|
@@ -76,6 +79,23 @@ ConfigureLayout::ConfigureLayout(QWidget* parent)
|
|
|
|
|
ui->screen_bottom_stretch, static_cast<void (QCheckBox::*)(int)>(&QCheckBox::stateChanged),
|
|
|
|
|
this,
|
|
|
|
|
[this](bool checkState) { ui->screen_bottom_topbottom_padding->setEnabled(checkState); });
|
|
|
|
|
#else
|
|
|
|
|
connect(ui->screen_top_stretch, &QCheckBox::checkStateChanged, this,
|
|
|
|
|
[this](bool checkState) { ui->screen_top_leftright_padding->setEnabled(checkState); });
|
|
|
|
|
ui->screen_top_topbottom_padding->setEnabled(Settings::values.screen_top_stretch.GetValue());
|
|
|
|
|
connect(ui->screen_top_stretch, &QCheckBox::checkStateChanged, this,
|
|
|
|
|
[this](bool checkState) { ui->screen_top_topbottom_padding->setEnabled(checkState); });
|
|
|
|
|
ui->screen_bottom_leftright_padding->setEnabled(
|
|
|
|
|
Settings::values.screen_bottom_topbottom_padding.GetValue());
|
|
|
|
|
connect(
|
|
|
|
|
ui->screen_bottom_stretch, &QCheckBox::checkStateChanged, this,
|
|
|
|
|
[this](bool checkState) { ui->screen_bottom_leftright_padding->setEnabled(checkState); });
|
|
|
|
|
ui->screen_bottom_topbottom_padding->setEnabled(
|
|
|
|
|
Settings::values.screen_bottom_topbottom_padding.GetValue());
|
|
|
|
|
connect(
|
|
|
|
|
ui->screen_bottom_stretch, &QCheckBox::checkStateChanged, this,
|
|
|
|
|
[this](bool checkState) { ui->screen_bottom_topbottom_padding->setEnabled(checkState); });
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
connect(ui->bg_button, &QPushButton::clicked, this, [this] {
|
|
|
|
|
const QColor new_bg_color = QColorDialog::getColor(bg_color);
|
|
|
|
|
|