[TD] GQIViedDimension.cpp, GQCustomText.cpp - Fix Dimension label unit positioning bug and too tight bounding rectangle.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -257,7 +257,8 @@ void QGIDatumLabel::setPosFromCenter(const double &xCenter, const double &yCente
|
||||
QRectF unitBox = m_unitText->boundingRect();
|
||||
double unitWidth = unitBox.width();
|
||||
double unitRight = right + unitWidth;
|
||||
m_unitText->setPos(right,top);
|
||||
// Set the m_unitText font *baseline* at same height as the m_dimText font baseline
|
||||
m_unitText->setPos(right, 0.0);
|
||||
|
||||
//set tolerance position
|
||||
QRectF overBox = m_tolTextOver->boundingRect();
|
||||
|
||||
Reference in New Issue
Block a user