Skip to content
Permalink
Browse files

[composer] fix html label stylesheet's margin (fixes #15290)

(cherry-picked from 7352df6)
  • Loading branch information
nyalldawson committed Jul 19, 2016
1 parent 57314a1 commit 5dabc9ded2f7ac0b989eace70b7fc0053cc06c60
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/composer/qgscomposerlabel.cpp
@@ -644,7 +644,7 @@ void QgsComposerLabel::itemShiftAdjustSize( double newWidth, double newHeight, d
QUrl QgsComposerLabel::createStylesheetUrl() const
{
QString stylesheet;
stylesheet += QString( "body { margin: %1 %2;" ).arg( qMax( mMarginX * mHtmlUnitsToMM, 0.0 ) ).arg( qMax( mMarginY * mHtmlUnitsToMM, 0.0 ) );
stylesheet += QString( "body { margin: %1 %2;" ).arg( qMax( mMarginY * mHtmlUnitsToMM, 0.0 ) ).arg( qMax( mMarginX * mHtmlUnitsToMM, 0.0 ) );
stylesheet += QgsFontUtils::asCSS( mFont, 0.352778 * mHtmlUnitsToMM );
stylesheet += QString( "color: %1;" ).arg( mFontColor.name() );
stylesheet += QString( "text-align: %1; }" ).arg( mHAlignment == Qt::AlignLeft ? "left" : mHAlignment == Qt::AlignRight ? "right" : "center" );

0 comments on commit 5dabc9d

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