configure_layout: Build fixes for QT 6.8
Some checks failed
mandarine-build / source (push) Has been cancelled
mandarine-build / linux (appimage) (push) Has been cancelled
mandarine-build / linux (fresh) (push) Has been cancelled
mandarine-build / macos (arm64) (push) Has been cancelled
mandarine-build / macos (x86_64) (push) Has been cancelled
mandarine-build / windows (msvc) (push) Has been cancelled
mandarine-build / windows (msys2) (push) Has been cancelled
mandarine-build / android (push) Has been cancelled
mandarine-format / clang-format (push) Has been cancelled
mandarine-build / macos-universal (push) Has been cancelled
mandarine-build / release (push) Has been cancelled

This commit is contained in:
Reg Tiangha 2024-09-28 18:36:58 +02:00 committed by Gamer64
parent c30a57bc21
commit 9c8593a84b

View File

@ -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 "common/settings.h"
#include "mandarine_qt/configuration/configuration_shared.h"
#include "mandarine_qt/configuration/configure_layout.h"
@ -48,6 +49,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); });
@ -67,6 +70,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);