Skip to content

Commit

Permalink
[composer] fix html label stylesheet's margin (fixes #15290)
Browse files Browse the repository at this point in the history
(cherry-picked from 7352df6)
  • Loading branch information
nyalldawson committed Jul 19, 2016
1 parent 368a88f commit 9953875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposerlabel.cpp
Expand Up @@ -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" );
Expand Down

0 comments on commit 9953875

Please sign in to comment.