diff options
author | robotbrainify <robotbrainify@gmail.com> | 2013-10-12 09:58:26 -0400 |
---|---|---|
committer | robotbrainify <robotbrainify@gmail.com> | 2013-10-12 09:58:26 -0400 |
commit | aef28fd3a54884c82d3eb196b79de95c2583df64 (patch) | |
tree | 8d6f2fcbe50720e89f8680f62e1dd032de1990b0 /gui/MCModInfoFrame.cpp | |
parent | 281826f713d9a373c71cf01fb365c045c1555fe6 (diff) | |
download | MultiMC-aef28fd3a54884c82d3eb196b79de95c2583df64.tar MultiMC-aef28fd3a54884c82d3eb196b79de95c2583df64.tar.gz MultiMC-aef28fd3a54884c82d3eb196b79de95c2583df64.tar.lz MultiMC-aef28fd3a54884c82d3eb196b79de95c2583df64.tar.xz MultiMC-aef28fd3a54884c82d3eb196b79de95c2583df64.zip |
It works...
yeehaa!
Diffstat (limited to 'gui/MCModInfoFrame.cpp')
-rw-r--r-- | gui/MCModInfoFrame.cpp | 7 |
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(); } |