Merge pull request #3886 from phit/fixftblegacy

NOISSUE Fix FTB Legacy Pack Selection
This commit is contained in:
Petr Mrázek 2021-06-21 00:46:16 +02:00 committed by GitHub
commit 8179a89103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View File

@ -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));

View File

@ -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"));

View File

@ -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));

View File

@ -127,7 +127,7 @@ void Page::suggestCurrent()
return;
}
if(!selected.broken || !selectedVersion.isEmpty())
if(selected.broken || selectedVersion.isEmpty())
{
dialog->setSuggestedPack();
return;