Skip to content

Commit

Permalink
Tweak default symbol for overviews
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 7, 2017
1 parent aa2b73d commit 332a69c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/layout/qgslayoutitemmapoverview.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ QgsLayoutItemMapOverview::QgsLayoutItemMapOverview( const QString &name, QgsLayo
void QgsLayoutItemMapOverview::createDefaultFrameSymbol() void QgsLayoutItemMapOverview::createDefaultFrameSymbol()
{ {
QgsStringMap properties; 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" ), QStringLiteral( "solid" ) );
properties.insert( QStringLiteral( "style_border" ), QStringLiteral( "no" ) ); properties.insert( QStringLiteral( "style_border" ), QStringLiteral( "no" ) );
mFrameSymbol.reset( QgsFillSymbol::createSimple( properties ) ); mFrameSymbol.reset( QgsFillSymbol::createSimple( properties ) );
mFrameSymbol->setOpacity( 0.3 );
} }


void QgsLayoutItemMapOverview::draw( QPainter *painter ) void QgsLayoutItemMapOverview::draw( QPainter *painter )
Expand Down
1 change: 1 addition & 0 deletions tests/src/python/test_qgslayoutmap.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def testOverviewMap(self):
overviewMap.setExtent(myRectangle2) overviewMap.setExtent(myRectangle2)
overviewMap.overview().setFrameMap(self.map) overviewMap.overview().setFrameMap(self.map)
checker = QgsLayoutChecker('composermap_overview', self.layout) checker = QgsLayoutChecker('composermap_overview', self.layout)
checker.setColorTolerance(6)
checker.setControlPathPrefix("composer_mapoverview") checker.setControlPathPrefix("composer_mapoverview")
myTestResult, myMessage = checker.testLayout() myTestResult, myMessage = checker.testLayout()
self.layout.removeLayoutItem(overviewMap) self.layout.removeLayoutItem(overviewMap)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 332a69c

Please sign in to comment.