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

fix(text): Change idealSize calculation

Ideal size of doc can not be used because in the case of using it for
boundingRect (which uses 0,0 as the upper-left corner) leads to the
clipping right side of RTL languages.

Fixed #1887.
This commit is contained in:
Diadlo 2016-09-14 13:02:59 +03:00
parent dc10309a82
commit c8512fa984
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727

View File

@ -293,7 +293,7 @@ void Text::freeResources()
QSizeF Text::idealSize() QSizeF Text::idealSize()
{ {
if (doc) if (doc)
return QSizeF(qMin(doc->idealWidth(), width), doc->size().height()); return doc->size();
return size; return size;
} }