Tweak default symbol for overviews

This commit is contained in:
Nyall Dawson 2017-10-21 20:38:29 +10:00
parent aa2b73d425
commit 332a69cece
5 changed files with 2 additions and 2 deletions

View File

@ -38,11 +38,10 @@ QgsLayoutItemMapOverview::QgsLayoutItemMapOverview( const QString &name, QgsLayo
void QgsLayoutItemMapOverview::createDefaultFrameSymbol()
{
QgsStringMap properties;
properties.insert( QStringLiteral( "color" ), QStringLiteral( "255,0,0,255" ) );
properties.insert( QStringLiteral( "color" ), QStringLiteral( "255,0,0,75" ) );
properties.insert( QStringLiteral( "style" ), QStringLiteral( "solid" ) );
properties.insert( QStringLiteral( "style_border" ), QStringLiteral( "no" ) );
mFrameSymbol.reset( QgsFillSymbol::createSimple( properties ) );
mFrameSymbol->setOpacity( 0.3 );
}
void QgsLayoutItemMapOverview::draw( QPainter *painter )

View File

@ -84,6 +84,7 @@ class TestQgsComposerMap(unittest.TestCase):
overviewMap.setExtent(myRectangle2)
overviewMap.overview().setFrameMap(self.map)
checker = QgsLayoutChecker('composermap_overview', self.layout)
checker.setColorTolerance(6)
checker.setControlPathPrefix("composer_mapoverview")
myTestResult, myMessage = checker.testLayout()
self.layout.removeLayoutItem(overviewMap)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB