mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
added button to disable dependencies on the mod review
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -13,6 +13,7 @@ ReviewMessageBox::ReviewMessageBox(QWidget* parent, [[maybe_unused]] QString con
|
||||
auto back_button = ui->buttonBox->button(QDialogButtonBox::Cancel);
|
||||
back_button->setText(tr("Back"));
|
||||
|
||||
ui->toggleDepsButton->hide();
|
||||
ui->modTreeWidget->header()->setSectionResizeMode(0, QHeaderView::Stretch);
|
||||
ui->modTreeWidget->header()->setStretchLastSection(false);
|
||||
ui->modTreeWidget->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
|
||||
@ -75,6 +76,8 @@ void ReviewMessageBox::appendResource(ResourceInformation&& info)
|
||||
}
|
||||
|
||||
itemTop->insertChildren(childIndx++, { requiredByItem });
|
||||
ui->toggleDepsButton->show();
|
||||
m_deps << itemTop;
|
||||
}
|
||||
|
||||
auto versionTypeItem = new QTreeWidgetItem(itemTop);
|
||||
@ -108,3 +111,10 @@ void ReviewMessageBox::retranslateUi(QString resources_name)
|
||||
ui->explainLabel->setText(tr("You're about to download the following %1:").arg(resources_name));
|
||||
ui->onlyCheckedLabel->setText(tr("Only %1 with a check will be downloaded!").arg(resources_name));
|
||||
}
|
||||
void ReviewMessageBox::on_toggleDepsButton_clicked()
|
||||
{
|
||||
m_deps_checked = !m_deps_checked;
|
||||
auto state = m_deps_checked ? Qt::Checked : Qt::Unchecked;
|
||||
for (auto dep : m_deps)
|
||||
dep->setCheckState(0, state);
|
||||
};
|
Reference in New Issue
Block a user