lime_qt: Group QT macro version checks together

This commit is contained in:
Reg Tiangha 2024-09-23 10:57:32 -06:00 committed by OpenSauce
parent 046e6385d2
commit d270789002

View File

@ -49,47 +49,45 @@ 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); });
#else
connect(ui->screen_top_stretch, &QCheckBox::checkStateChanged, this,
[this](bool checkState) { ui->screen_top_leftright_padding->setEnabled(checkState); });
#endif
ui->screen_top_topbottom_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_topbottom_padding->setEnabled(checkState); });
#else
connect(ui->screen_top_stretch, &QCheckBox::checkStateChanged, this,
[this](bool checkState) { ui->screen_top_topbottom_padding->setEnabled(checkState); });
#endif
ui->screen_bottom_leftright_padding->setEnabled(
Settings::values.screen_bottom_topbottom_padding.GetValue());
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
connect(
ui->screen_bottom_stretch, static_cast<void (QCheckBox::*)(int)>(&QCheckBox::stateChanged),
this,
[this](bool checkState) { ui->screen_bottom_leftright_padding->setEnabled(checkState); });
#else
connect(
ui->screen_bottom_stretch, &QCheckBox::checkStateChanged, this,
[this](bool checkState) { ui->screen_bottom_leftright_padding->setEnabled(checkState); });
#endif
ui->screen_bottom_topbottom_padding->setEnabled(
Settings::values.screen_bottom_topbottom_padding.GetValue());
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
connect(
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);
if (!new_bg_color.isValid()) {