[ui] Avoid hard-coded white background for north arrow / image decoration preview

This commit is contained in:
nirvn 2019-09-25 15:51:30 +07:00 committed by Mathieu Pellerin
parent fb8b1f553d
commit c97b087620
2 changed files with 4 additions and 4 deletions

View File

@ -227,7 +227,7 @@ void QgsDecorationImageDialog::drawImage()
if ( !missing )
{
QPixmap px( maxLength, maxLength );
px.fill();
px.fill( Qt::transparent );
QPainter painter;
painter.begin( &px );
@ -251,7 +251,7 @@ void QgsDecorationImageDialog::drawImage()
else
{
QPixmap px( 200, 200 );
px.fill();
px.fill( Qt::transparent );
QPainter painter;
painter.begin( &px );
QFont font( QStringLiteral( "time" ), 12, QFont::Bold );

View File

@ -190,7 +190,7 @@ void QgsDecorationNorthArrowDialog::drawNorthArrow()
}
QPixmap myPainterPixmap( maxLength, maxLength );
myPainterPixmap.fill();
myPainterPixmap.fill( Qt::transparent );
QPainter myQPainter;
myQPainter.begin( &myPainterPixmap );
@ -230,7 +230,7 @@ void QgsDecorationNorthArrowDialog::drawNorthArrow()
else
{
QPixmap myPainterPixmap( 200, 200 );
myPainterPixmap.fill();
myPainterPixmap.fill( Qt::transparent );
QPainter myQPainter;
myQPainter.begin( &myPainterPixmap );
QFont myQFont( QStringLiteral( "time" ), 12, QFont::Bold );