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:
parent
bc21af4fa2
commit
7321127794
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user