From 003e0190482e7a8db669d82578c389b0339c2e4e Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Wed, 10 Feb 2021 16:11:59 +0000 Subject: [PATCH] NOISSUE Show ATLauncher pack descriptions in text browser --- .../pages/modplatform/atlauncher/AtlModel.cpp | 2 +- .../pages/modplatform/atlauncher/AtlPage.cpp | 2 + .../pages/modplatform/atlauncher/AtlPage.ui | 43 ++++++++++--------- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/application/pages/modplatform/atlauncher/AtlModel.cpp b/application/pages/modplatform/atlauncher/AtlModel.cpp index 46e35ec6..4b1b1c8e 100644 --- a/application/pages/modplatform/atlauncher/AtlModel.cpp +++ b/application/pages/modplatform/atlauncher/AtlModel.cpp @@ -39,7 +39,7 @@ QVariant ListModel::data(const QModelIndex &index, int role) const } else if (role == Qt::ToolTipRole) { - return pack.description; + return pack.name; } else if(role == Qt::DecorationRole) { diff --git a/application/pages/modplatform/atlauncher/AtlPage.cpp b/application/pages/modplatform/atlauncher/AtlPage.cpp index cfc61e8d..4518248d 100644 --- a/application/pages/modplatform/atlauncher/AtlPage.cpp +++ b/application/pages/modplatform/atlauncher/AtlPage.cpp @@ -80,6 +80,8 @@ void AtlPage::onSelectionChanged(QModelIndex first, QModelIndex second) selected = filterModel->data(first, Qt::UserRole).value(); + ui->packDescription->setHtml(selected.description.replace("\n", "
")); + for(const auto& version : selected.versions) { ui->versionSelectionBox->addItem(version.version); } diff --git a/application/pages/modplatform/atlauncher/AtlPage.ui b/application/pages/modplatform/atlauncher/AtlPage.ui index fa88597e..dd17283c 100644 --- a/application/pages/modplatform/atlauncher/AtlPage.ui +++ b/application/pages/modplatform/atlauncher/AtlPage.ui @@ -11,26 +11,6 @@ - - - - - - - - - Version selected: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - @@ -44,6 +24,29 @@ + + + + + + + + + + + + + + + Version selected: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + +