hack: hide 'Download Mods' button when not in the mods tab

This commit is contained in:
flow 2022-03-03 04:02:22 -03:00
parent f95cebaf06
commit 9e443faba3
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -143,10 +143,17 @@ ModFolderPage::ModFolderPage(
ui(new Ui::ModFolderPage)
{
ui->setupUi(this);
auto act = ui->actionDownload;
if(id == "mods") {
auto act = ui->actionDownload;
connect(act, &QAction::triggered, this, &ModFolderPage::on_actionInstall_mods_triggered);
}
else{
// HACK: Prevent the download button from showing in the shaders / resource packs tab
// This whole thing needs some cleaning up anyway, no next time we can do it properly...
act->setVisible(false);
act->setText("");
act->setToolTip("");
}
ui->actionsToolbar->insertSpacer(ui->actionView_configs);
m_inst = inst;