diff --git a/src/qt_gui/cheats_patches.cpp b/src/qt_gui/cheats_patches.cpp index 2fea0b6ea..13157aa3a 100644 --- a/src/qt_gui/cheats_patches.cpp +++ b/src/qt_gui/cheats_patches.cpp @@ -188,8 +188,12 @@ void CheatsPatches::setupUI() { } }); + QPushButton* closeButton = new QPushButton(tr("Close")); + connect(closeButton, &QPushButton::clicked, [this]() { QWidget::close(); }); + controlLayout->addWidget(downloadButton); controlLayout->addWidget(deleteCheatButton); + controlLayout->addWidget(closeButton); cheatsLayout->addLayout(controlLayout); cheatsTab->setLayout(cheatsLayout); @@ -464,6 +468,8 @@ void CheatsPatches::onSaveButtonClicked() { } else { QMessageBox::information(this, tr("Success"), tr("Options saved successfully.")); } + + QWidget::close(); } QCheckBox* CheatsPatches::findCheckBoxByName(const QString& name) { diff --git a/src/qt_gui/settings_dialog.cpp b/src/qt_gui/settings_dialog.cpp index a4b584294..175c8c51d 100644 --- a/src/qt_gui/settings_dialog.cpp +++ b/src/qt_gui/settings_dialog.cpp @@ -522,22 +522,6 @@ bool SettingsDialog::eventFilter(QObject* obj, QEvent* event) { } else { ui->descriptionText->setText(defaultTextEdit); } - - // if the text exceeds the size of the box, it will increase the size - QRect currentGeometry = this->geometry(); - int newWidth = currentGeometry.width(); - - int documentHeight = ui->descriptionText->document()->size().height(); - int visibleHeight = ui->descriptionText->viewport()->height(); - if (documentHeight > visibleHeight) { - ui->descriptionText->setMaximumSize(16777215, 110); - this->setGeometry(currentGeometry.x(), currentGeometry.y(), newWidth, - currentGeometry.height() + 40); - } else { - ui->descriptionText->setMaximumSize(16777215, 70); - this->setGeometry(currentGeometry.x(), currentGeometry.y(), newWidth, - initialHeight); - } return true; } } diff --git a/src/qt_gui/settings_dialog.ui b/src/qt_gui/settings_dialog.ui index 8d68d1c90..c084d4849 100644 --- a/src/qt_gui/settings_dialog.ui +++ b/src/qt_gui/settings_dialog.ui @@ -12,7 +12,7 @@ 0 0 970 - 750 + 820 @@ -68,7 +68,7 @@ 0 0 946 - 586 + 611 @@ -77,43 +77,6 @@ 0 - - - - - - System - - - - - - Console Language - - - - - - - - - - - - Emulator Language - - - - - - - - - - - - - @@ -217,246 +180,6 @@ - - - - 6 - - - QLayout::SizeConstraint::SetDefaultConstraint - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Update - - - - 10 - - - 1 - - - 11 - - - 11 - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Update Channel - - - - 7 - - - 11 - - - 11 - - - 11 - - - 11 - - - - - - 0 - 0 - - - - - Release - - - - - Nightly - - - - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Check for Updates - - - - - - - - 0 - 0 - - - - - 11 - false - - - - Check for Updates at Startup - - - - - - - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Game Compatibility - - - - 10 - - - 1 - - - 11 - - - - - Display Compatibility Data - - - - - - - Update Compatibility Database On Startup - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Update Compatibility Database - - - - - - - - @@ -627,6 +350,283 @@ + + + + + + System + + + + + + Console Language + + + + + + + + + + + + Emulator Language + + + + + + + + + + + + + + + + + 6 + + + QLayout::SizeConstraint::SetDefaultConstraint + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Update + + + + 10 + + + 1 + + + 11 + + + 190 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Update Channel + + + + 7 + + + 11 + + + 11 + + + 11 + + + 11 + + + + + + 0 + 0 + + + + + Release + + + + + Nightly + + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Check for Updates + + + + + + + + 0 + 0 + + + + + 11 + false + + + + Check for Updates at Startup + + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Game Compatibility + + + + 10 + + + 1 + + + 11 + + + + + Display Compatibility Data + + + + + + + Update Compatibility Database On Startup + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Update Compatibility Database + + + + + + + + @@ -645,12 +645,12 @@ 0 0 946 - 586 + 605 - + @@ -664,17 +664,14 @@ Cursor - - - 0 - + 11 11 - + true @@ -701,7 +698,7 @@ - + true @@ -836,7 +833,7 @@ true - + 0 0 @@ -872,6 +869,12 @@ true + + + 0 + 0 + + 0 @@ -885,23 +888,6 @@ - - - - - - Qt::Orientation::Horizontal - - - - 40 - 20 - - - - - - @@ -943,7 +929,7 @@ 0 0 946 - 586 + 605 @@ -1124,11 +1110,14 @@ + + true + Advanced - Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop @@ -1194,7 +1183,7 @@ 0 0 946 - 586 + 605 @@ -1233,22 +1222,6 @@ - - - - Qt::Orientation::Horizontal - - - QSizePolicy::Policy::Preferred - - - - 40 - 20 - - - - @@ -1445,10 +1418,16 @@ + + + 0 + 0 + + 16777215 - 70 + 120