Skip to content
Permalink
Browse files

Fix oversized width in QgsLayoutItemLabel::adjustSizeToText

  • Loading branch information
nyalldawson committed Jan 22, 2020
1 parent b51c8dc commit ba4242076d6ef1a3c79e8fcc7912b7b99e439efb
@@ -358,7 +358,7 @@ QSizeF QgsLayoutItemLabel::sizeForText() const

double penWidth = frameEnabled() ? ( pen().widthF() / 2.0 ) : 0;

double width = textWidth + 2 * mMarginX + 2 * penWidth + 1;
double width = textWidth + 2 * mMarginX + 2 * penWidth;
double height = fontHeight + 2 * mMarginY + 2 * penWidth;

return mLayout->convertToLayoutUnits( QgsLayoutSize( width, height, QgsUnitTypes::LayoutMillimeters ) );
Binary file not shown.
Binary file not shown.

0 comments on commit ba42420

Please sign in to comment.
You can’t perform that action at this time.