mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
[ui] Avoid hard-coded white background for north arrow / image decoration preview
This commit is contained in:
parent
fb8b1f553d
commit
c97b087620
@ -227,7 +227,7 @@ void QgsDecorationImageDialog::drawImage()
|
|||||||
if ( !missing )
|
if ( !missing )
|
||||||
{
|
{
|
||||||
QPixmap px( maxLength, maxLength );
|
QPixmap px( maxLength, maxLength );
|
||||||
px.fill();
|
px.fill( Qt::transparent );
|
||||||
|
|
||||||
QPainter painter;
|
QPainter painter;
|
||||||
painter.begin( &px );
|
painter.begin( &px );
|
||||||
@ -251,7 +251,7 @@ void QgsDecorationImageDialog::drawImage()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
QPixmap px( 200, 200 );
|
QPixmap px( 200, 200 );
|
||||||
px.fill();
|
px.fill( Qt::transparent );
|
||||||
QPainter painter;
|
QPainter painter;
|
||||||
painter.begin( &px );
|
painter.begin( &px );
|
||||||
QFont font( QStringLiteral( "time" ), 12, QFont::Bold );
|
QFont font( QStringLiteral( "time" ), 12, QFont::Bold );
|
||||||
|
@ -190,7 +190,7 @@ void QgsDecorationNorthArrowDialog::drawNorthArrow()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QPixmap myPainterPixmap( maxLength, maxLength );
|
QPixmap myPainterPixmap( maxLength, maxLength );
|
||||||
myPainterPixmap.fill();
|
myPainterPixmap.fill( Qt::transparent );
|
||||||
|
|
||||||
QPainter myQPainter;
|
QPainter myQPainter;
|
||||||
myQPainter.begin( &myPainterPixmap );
|
myQPainter.begin( &myPainterPixmap );
|
||||||
@ -230,7 +230,7 @@ void QgsDecorationNorthArrowDialog::drawNorthArrow()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
QPixmap myPainterPixmap( 200, 200 );
|
QPixmap myPainterPixmap( 200, 200 );
|
||||||
myPainterPixmap.fill();
|
myPainterPixmap.fill( Qt::transparent );
|
||||||
QPainter myQPainter;
|
QPainter myQPainter;
|
||||||
myQPainter.begin( &myPainterPixmap );
|
myQPainter.begin( &myPainterPixmap );
|
||||||
QFont myQFont( QStringLiteral( "time" ), 12, QFont::Bold );
|
QFont myQFont( QStringLiteral( "time" ), 12, QFont::Bold );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user