mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-27 21:15:19 +00:00
tool tip bugfixes
This commit is contained in:
parent
f99a3072b8
commit
71948073e9
@ -15,7 +15,6 @@
|
||||
|
||||
#include "MCModInfoFrame.h"
|
||||
#include "ui_MCModInfoFrame.h"
|
||||
#include <iostream>
|
||||
void MCModInfoFrame::updateWithMod(Mod &m)
|
||||
{
|
||||
if(m.type() == m.MOD_FOLDER)
|
||||
@ -70,6 +69,7 @@ void MCModInfoFrame::setModText(QString text)
|
||||
|
||||
void MCModInfoFrame::setModDescription(QString text)
|
||||
{
|
||||
ui->label_ModDescription->setToolTip("");
|
||||
QString intermediatetext = text.trimmed();
|
||||
bool prev(false);
|
||||
QChar rem('\n');
|
||||
@ -88,12 +88,11 @@ void MCModInfoFrame::setModDescription(QString text)
|
||||
if(finaltext.length() > 297)
|
||||
{
|
||||
labeltext.append(finaltext.left(287) + "...");
|
||||
ui->label_ModDescription->setToolTip(text);
|
||||
ui->label_ModDescription->setToolTip(text.replace('\n', "<br/>"));
|
||||
}
|
||||
else
|
||||
{
|
||||
labeltext.append(finaltext);
|
||||
}
|
||||
// std::cout << finaltext.length() << std::endl;
|
||||
ui->label_ModDescription->setText(labeltext);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user