Skip to content

Commit 9f330fc

Browse files
authored
Merge pull request #3309 from nirvn/html_label_fix
[composer] fix html label stylesheet's margin (fixes #15290)
2 parents cca4e32 + 7352df6 commit 9f330fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/composer/qgscomposerlabel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ void QgsComposerLabel::itemShiftAdjustSize( double newWidth, double newHeight, d
645645
QUrl QgsComposerLabel::createStylesheetUrl() const
646646
{
647647
QString stylesheet;
648-
stylesheet += QString( "body { margin: %1 %2;" ).arg( qMax( mMarginX * mHtmlUnitsToMM, 0.0 ) ).arg( qMax( mMarginY * mHtmlUnitsToMM, 0.0 ) );
648+
stylesheet += QString( "body { margin: %1 %2;" ).arg( qMax( mMarginY * mHtmlUnitsToMM, 0.0 ) ).arg( qMax( mMarginX * mHtmlUnitsToMM, 0.0 ) );
649649
stylesheet += QgsFontUtils::asCSS( mFont, 0.352778 * mHtmlUnitsToMM );
650650
stylesheet += QString( "color: %1;" ).arg( mFontColor.name() );
651651
stylesheet += QString( "text-align: %1; }" ).arg( mHAlignment == Qt::AlignLeft ? "left" : mHAlignment == Qt::AlignRight ? "right" : "center" );

0 commit comments

Comments
 (0)