1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

set the correct wrap mode

This commit is contained in:
krepa098 2015-02-03 22:06:31 +01:00
parent bc21af4fa2
commit 7321127794

View File

@ -229,16 +229,14 @@ void Text::regenerate()
if(dirty)
{
if(!elide)
{
doc->setHtml(text);
}
else
{
QTextOption opt;
opt.setWrapMode(QTextOption::NoWrap);
doc->setDefaultTextOption(opt);
doc->setPlainText(elidedText);
}
// wrap mode
QTextOption opt;
opt.setWrapMode(elide ? QTextOption::NoWrap : QTextOption::WrapAtWordBoundaryOrAnywhere);
doc->setDefaultTextOption(opt);
// width & layout
doc->setTextWidth(width);