Skip to content

Commit 9953875

Browse files
committed
[composer] fix html label stylesheet's margin (fixes #15290)
(cherry-picked from 7352df6)
1 parent 368a88f commit 9953875

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/composer/qgscomposerlabel.cpp

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

0 commit comments

Comments
 (0)