From 9e443faba3fe8ef9b14fd466e9e98aaeaf68656e Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 3 Mar 2022 04:02:22 -0300 Subject: [PATCH] hack: hide 'Download Mods' button when not in the mods tab --- launcher/ui/pages/instance/ModFolderPage.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp index 3baec1de..3becd1db 100644 --- a/launcher/ui/pages/instance/ModFolderPage.cpp +++ b/launcher/ui/pages/instance/ModFolderPage.cpp @@ -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;