From f95cebaf06e30705d9980fa765189674f13113a7 Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 3 Mar 2022 01:10:10 -0300 Subject: [PATCH 1/3] change 'Install Mods' -> 'Download Mods' and change position --- launcher/ui/pages/instance/ModFolderPage.cpp | 3 +-- launcher/ui/pages/instance/ModFolderPage.ui | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp index b342accf..3baec1de 100644 --- a/launcher/ui/pages/instance/ModFolderPage.cpp +++ b/launcher/ui/pages/instance/ModFolderPage.cpp @@ -144,8 +144,7 @@ ModFolderPage::ModFolderPage( { ui->setupUi(this); if(id == "mods") { - auto act = new QAction(tr("Install Mods"), this); - ui->actionsToolbar->insertActionBefore(ui->actionView_configs,act); + auto act = ui->actionDownload; connect(act, &QAction::triggered, this, &ModFolderPage::on_actionInstall_mods_triggered); } ui->actionsToolbar->insertSpacer(ui->actionView_configs); diff --git a/launcher/ui/pages/instance/ModFolderPage.ui b/launcher/ui/pages/instance/ModFolderPage.ui index 0fb51e84..75e0d1c5 100644 --- a/launcher/ui/pages/instance/ModFolderPage.ui +++ b/launcher/ui/pages/instance/ModFolderPage.ui @@ -84,6 +84,7 @@ false + @@ -99,6 +100,14 @@ Add mods + + + &Download Mods + + + Download Mods + + &Remove From 9e443faba3fe8ef9b14fd466e9e98aaeaf68656e Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 3 Mar 2022 04:02:22 -0300 Subject: [PATCH 2/3] 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; From e0c025b162fe44fb29951d4bd55e675ae504c871 Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 3 Mar 2022 09:51:46 -0300 Subject: [PATCH 3/3] fix extra spacing in resource packs and shader packs, and move button up hopefully now its finally ok --- launcher/ui/pages/instance/ModFolderPage.cpp | 18 ++++++++++-------- launcher/ui/pages/instance/ModFolderPage.ui | 11 +---------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp index 3becd1db..e4ad9012 100644 --- a/launcher/ui/pages/instance/ModFolderPage.cpp +++ b/launcher/ui/pages/instance/ModFolderPage.cpp @@ -143,17 +143,19 @@ ModFolderPage::ModFolderPage( ui(new Ui::ModFolderPage) { ui->setupUi(this); - auto act = ui->actionDownload; + + // This is structured like that so that these changes + // do not affect the Resouce pack and Shader pack tabs if(id == "mods") { + auto act = new QAction(tr("Download mods"), this); + act->setToolTip(tr("Download mods from online mod platforms")); + ui->actionsToolbar->insertActionBefore(ui->actionAdd, act); connect(act, &QAction::triggered, this, &ModFolderPage::on_actionInstall_mods_triggered); + + ui->actionAdd->setText("Add .jar"); + ui->actionAdd->setToolTip("Add mods via local file"); } - 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; diff --git a/launcher/ui/pages/instance/ModFolderPage.ui b/launcher/ui/pages/instance/ModFolderPage.ui index 75e0d1c5..ab59b0df 100644 --- a/launcher/ui/pages/instance/ModFolderPage.ui +++ b/launcher/ui/pages/instance/ModFolderPage.ui @@ -84,7 +84,6 @@ false - @@ -97,15 +96,7 @@ &Add - Add mods - - - - - &Download Mods - - - Download Mods + Add