summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/MCModInfoFrame.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/gui/MCModInfoFrame.cpp b/gui/MCModInfoFrame.cpp
index 4a78d329..5b65d169 100644
--- a/gui/MCModInfoFrame.cpp
+++ b/gui/MCModInfoFrame.cpp
@@ -42,6 +42,7 @@ void MCModInfoFrame::updateWithMod(Mod &m)
}
else
{
+ desc = m.description();
setModDescription(m.description());
}
}
@@ -90,11 +91,13 @@ void MCModInfoFrame::setModDescription(QString text)
if(finaltext.length() > 290)
{
ui->label_ModDescription->setOpenExternalLinks(false);
- labeltext.append(finaltext.left(287) + "<a href=\"\">...</a>");
+ ui->label_ModDescription->setTextFormat(Qt::TextFormat::RichText);
+ labeltext.append("<html><body>" + finaltext.left(287) + "<a href=\"#mod_desc\">...</a></body></html>");
QObject::connect(ui->label_ModDescription, &QLabel::linkActivated, this, &MCModInfoFrame::modDescEllipsisHandler);
}
else
{
+ ui->label_ModDescription->setTextFormat(Qt::TextFormat::PlainText);
labeltext.append(finaltext);
}
ui->label_ModDescription->setText(labeltext);
@@ -102,6 +105,6 @@ void MCModInfoFrame::setModDescription(QString text)
void MCModInfoFrame::modDescEllipsisHandler(const QString &link)
{
QMessageBox msgbox;
- msgbox.setDetailedText(desc);
+ msgbox.setText(desc);
msgbox.exec();
}