Skip to content
Permalink
Browse files

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

  • Loading branch information
nirvn committed Jul 16, 2016
1 parent cd3f540 commit 7352df6935368ca74fd2eef2bfe4b364908b9286
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 7352df6

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