Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.2
-
None
-
Linux X11
-
cb8445f0323b0eefbb04f1d8adad81a00b53abd8
Description
QScriptLine::height calculates height for a given font. Math is incorrectly assuming font height is one higher than it actually is because it is adding one for baseline. This causes headache for applications that try to put text inside widget that should be as small as possible without needing to clip the font.
Too bad removing that extra one requires fixing or hacks that have been added to font handling because of that plus one so fix isn't the simplest possible.
Problem was found when analyzing why MLabelViewSimple::drawContents was hitting clip path when it shouldn't. Problem found was that height of static text was one more that it should have been. The height comes directly from QScriptLine::height function.