From 6eabd336eef1855332573955a4ee225bd93c6bd8 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Wed, 10 Feb 2021 16:57:46 +0000 Subject: [PATCH] NOISSUE Show FTB pack descriptions in text browser --- application/pages/modplatform/ftb/FtbPage.cpp | 6 +++ application/pages/modplatform/ftb/FtbPage.ui | 52 +++++++++++-------- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/application/pages/modplatform/ftb/FtbPage.cpp b/application/pages/modplatform/ftb/FtbPage.cpp index 60294de07..dd2ff6662 100644 --- a/application/pages/modplatform/ftb/FtbPage.cpp +++ b/application/pages/modplatform/ftb/FtbPage.cpp @@ -6,6 +6,8 @@ #include "dialogs/NewInstanceDialog.h" #include "modplatform/modpacksch/FTBPackInstallTask.h" +#include "HoeDown.h" + FtbPage::FtbPage(NewInstanceDialog* dialog, QWidget *parent) : QWidget(parent), ui(new Ui::FtbPage), dialog(dialog) { @@ -108,6 +110,10 @@ void FtbPage::onSelectionChanged(QModelIndex first, QModelIndex second) selected = filterModel->data(first, Qt::UserRole).value(); + HoeDown hoedown; + QString output = hoedown.process(selected.description.toUtf8()); + ui->packDescription->setHtml(output); + // reverse foreach, so that the newest versions are first for (auto i = selected.versions.size(); i--;) { ui->versionSelectionBox->addItem(selected.versions.at(i).name); diff --git a/application/pages/modplatform/ftb/FtbPage.ui b/application/pages/modplatform/ftb/FtbPage.ui index 3a2203dbd..475d78bb4 100644 --- a/application/pages/modplatform/ftb/FtbPage.ui +++ b/application/pages/modplatform/ftb/FtbPage.ui @@ -11,16 +11,6 @@ - - - - Search - - - - - - @@ -41,25 +31,45 @@ - - - - true - - - - 48 - 48 - + + + + + + + Search + + + + + + + 48 + 48 + + + + + + + + true + + + true + + + + + searchEdit searchButton - packView versionSelectionBox