It works...
yeehaa!
This commit is contained in:
parent
281826f713
commit
aef28fd3a5
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user