[TD] GQIViedDimension.cpp, GQCustomText.cpp - Fix Dimension label unit positioning bug and too tight bounding rectangle.

This commit is contained in:
Aapo
2020-12-03 20:46:36 +02:00
committed by wwmayer
parent 9f930af3fe
commit 514b41b1c2
2 changed files with 4 additions and 3 deletions

View File

@@ -211,8 +211,8 @@ QRectF QGCustomText::tightBoundingRect() const
qreal y_adj = (result.height() - tight.height())/4.0;
// Adjust the bounding box 50% towards the Qt tightBoundingRect(),
// except chomp some extra empty space above the font (2*y_adj)
result.adjust(x_adj, 2*y_adj, -x_adj, -y_adj);
// except chomp some extra empty space above the font (1.75*y_adj)
result.adjust(x_adj, 1.75*y_adj, -x_adj, -y_adj);
return result;
}