summaryrefslogtreecommitdiffstats
path: root/gui/MCModInfoFrame.cpp
diff options
context:
space:
mode:
authorrobotbrainify <robotbrainify@gmail.com>2013-10-12 09:19:49 -0400
committerrobotbrainify <robotbrainify@gmail.com>2013-10-12 09:19:49 -0400
commit281826f713d9a373c71cf01fb365c045c1555fe6 (patch)
tree5d7cd352f4edec39baefc4188a9282c7a6f7f0fe /gui/MCModInfoFrame.cpp
parent71948073e9980ae517d38892fbc3fdf6b715a470 (diff)
downloadMultiMC-281826f713d9a373c71cf01fb365c045c1555fe6.tar
MultiMC-281826f713d9a373c71cf01fb365c045c1555fe6.tar.gz
MultiMC-281826f713d9a373c71cf01fb365c045c1555fe6.tar.lz
MultiMC-281826f713d9a373c71cf01fb365c045c1555fe6.tar.xz
MultiMC-281826f713d9a373c71cf01fb365c045c1555fe6.zip
switch from tooltip to messagebox
Diffstat (limited to 'gui/MCModInfoFrame.cpp')
-rw-r--r--gui/MCModInfoFrame.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/gui/MCModInfoFrame.cpp b/gui/MCModInfoFrame.cpp
index a45e30ea..4a78d329 100644
--- a/gui/MCModInfoFrame.cpp
+++ b/gui/MCModInfoFrame.cpp
@@ -15,6 +15,8 @@
#include "MCModInfoFrame.h"
#include "ui_MCModInfoFrame.h"
+#include <QMessageBox>
+#include <QtGui>
void MCModInfoFrame::updateWithMod(Mod &m)
{
if(m.type() == m.MOD_FOLDER)
@@ -85,10 +87,11 @@ void MCModInfoFrame::setModDescription(QString text)
}
QString labeltext;
labeltext.reserve(300);
- if(finaltext.length() > 297)
+ if(finaltext.length() > 290)
{
- labeltext.append(finaltext.left(287) + "...");
- ui->label_ModDescription->setToolTip(text.replace('\n', "<br/>"));
+ ui->label_ModDescription->setOpenExternalLinks(false);
+ labeltext.append(finaltext.left(287) + "<a href=\"\">...</a>");
+ QObject::connect(ui->label_ModDescription, &QLabel::linkActivated, this, &MCModInfoFrame::modDescEllipsisHandler);
}
else
{
@@ -96,3 +99,9 @@ void MCModInfoFrame::setModDescription(QString text)
}
ui->label_ModDescription->setText(labeltext);
}
+void MCModInfoFrame::modDescEllipsisHandler(const QString &link)
+{
+ QMessageBox msgbox;
+ msgbox.setDetailedText(desc);
+ msgbox.exec();
+}