From f6d6e4c1c463073c44b991e56381d4c1d8e498f8 Mon Sep 17 00:00:00 2001 From: phit <2097483+phit@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:52:10 +0200 Subject: [PATCH 1/2] NOISSUE Fix FTB Legacy Pack Selection --- application/pages/modplatform/legacy_ftb/Page.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/pages/modplatform/legacy_ftb/Page.cpp b/application/pages/modplatform/legacy_ftb/Page.cpp index 3bcc42c1..a438f76c 100644 --- a/application/pages/modplatform/legacy_ftb/Page.cpp +++ b/application/pages/modplatform/legacy_ftb/Page.cpp @@ -127,7 +127,7 @@ void Page::suggestCurrent() return; } - if(!selected.broken || !selectedVersion.isEmpty()) + if(selected.broken || selectedVersion.isEmpty()) { dialog->setSuggestedPack(); return; From e439ce6e0b8bed288a5a821ed5db80e42dd71e03 Mon Sep 17 00:00:00 2001 From: phit <2097483+phit@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:55:09 +0200 Subject: [PATCH 2/2] NOISSUE Fix Modplatform Scrollbars properly --- application/pages/modplatform/atlauncher/AtlPage.cpp | 3 +++ application/pages/modplatform/flame/FlamePage.cpp | 5 ++--- application/pages/modplatform/ftb/FtbPage.cpp | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/application/pages/modplatform/atlauncher/AtlPage.cpp b/application/pages/modplatform/atlauncher/AtlPage.cpp index 1b61ebd0..3c19804f 100644 --- a/application/pages/modplatform/atlauncher/AtlPage.cpp +++ b/application/pages/modplatform/atlauncher/AtlPage.cpp @@ -20,6 +20,9 @@ AtlPage::AtlPage(NewInstanceDialog* dialog, QWidget *parent) ui->packView->header()->hide(); ui->packView->setIndentation(0); + ui->versionSelectionBox->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); + ui->versionSelectionBox->view()->parentWidget()->setMaximumHeight(300); + for(int i = 0; i < filterModel->getAvailableSortings().size(); i++) { ui->sortByBox->addItem(filterModel->getAvailableSortings().keys().at(i)); diff --git a/application/pages/modplatform/flame/FlamePage.cpp b/application/pages/modplatform/flame/FlamePage.cpp index 2dd58e16..ade58431 100644 --- a/application/pages/modplatform/flame/FlamePage.cpp +++ b/application/pages/modplatform/flame/FlamePage.cpp @@ -17,9 +17,8 @@ FlamePage::FlamePage(NewInstanceDialog* dialog, QWidget *parent) listModel = new Flame::ListModel(this); ui->packView->setModel(listModel); - ui->versionSelectionBox->setMaxVisibleItems(10); - // fix height for themes that dont respect max visible like fusion - ui->versionSelectionBox->setStyleSheet("combobox-popup: 0;"); + ui->versionSelectionBox->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); + ui->versionSelectionBox->view()->parentWidget()->setMaximumHeight(300); // index is used to set the sorting with the curseforge api ui->sortByBox->addItem(tr("Sort by featured")); diff --git a/application/pages/modplatform/ftb/FtbPage.cpp b/application/pages/modplatform/ftb/FtbPage.cpp index b49982d5..b7f35c5d 100644 --- a/application/pages/modplatform/ftb/FtbPage.cpp +++ b/application/pages/modplatform/ftb/FtbPage.cpp @@ -23,6 +23,9 @@ FtbPage::FtbPage(NewInstanceDialog* dialog, QWidget *parent) ui->searchEdit->installEventFilter(this); + ui->versionSelectionBox->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); + ui->versionSelectionBox->view()->parentWidget()->setMaximumHeight(300); + for(int i = 0; i < filterModel->getAvailableSortings().size(); i++) { ui->sortByBox->addItem(filterModel->getAvailableSortings().keys().at(i));