Skip to content
Permalink
Browse files

Merge pull request #3309 from nirvn/html_label_fix

[composer] fix html label stylesheet's margin (fixes #15290)
  • Loading branch information
nyalldawson committed Jul 18, 2016
2 parents cca4e32 + 7352df6 commit 9f330fc9ff047d411bf27cd9f5ba6c37d1b80ae9
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/composer/qgscomposerlabel.cpp
@@ -645,7 +645,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 9f330fc

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