Skip to content
Permalink
Browse files

[ui] More hidpi-compatibility work for the vertex tool

  • Loading branch information
nirvn committed Feb 4, 2019
1 parent 46e7605 commit eb0a020c5441986ca82e07ad968677ccb4e88c6e
@@ -22,6 +22,7 @@
#include "qgslogger.h"
#include "qgsvertexmarker.h"
#include "qgsgeometryvalidator.h"
#include "qgsguiutils.h"
#include "qgsvectorlayer.h"
#include "qgsrubberband.h"
#include "qgisapp.h"
@@ -211,7 +212,8 @@ void QgsSelectedFeature::addError( QgsGeometry::Error e )
marker->setIconType( QgsVertexMarker::ICON_X );
marker->setColor( Qt::green );
marker->setZValue( marker->zValue() + 1 );
marker->setPenWidth( 2 );
marker->setIconSize( QgsGuiUtils::scaleIconSize( 10 ) );
marker->setPenWidth( QgsGuiUtils::scaleIconSize( 2 ) );
marker->setToolTip( e.what() );
mGeomErrorMarkers << marker;
}
@@ -14,6 +14,8 @@
***************************************************************************/

#include "vertextool/qgsvertexentry.h"

#include "qgsguiutils.h"
#include "qgsmaplayer.h"
#include "qgsmapcanvas.h"

@@ -54,7 +56,8 @@ void QgsVertexEntry::placeMarker()
mMarker->setIconType( mType );
}
mMarker->setColor( c );
mMarker->setPenWidth( mPenWidth );
mMarker->setIconSize( QgsGuiUtils::scaleIconSize( 10 ) );
mMarker->setPenWidth( QgsGuiUtils::scaleIconSize( mPenWidth ) );
mMarker->setToolTip( mToolTip );
}

@@ -15,6 +15,7 @@

#include "qgssnapindicator.h"

#include "qgsguiutils.h"
#include "qgsmapcanvas.h"
#include "qgssettings.h"
#include "qgsvectorlayer.h"
@@ -44,7 +45,8 @@ void QgsSnapIndicator::setMatch( const QgsPointLocator::Match &match )
if ( !mSnappingMarker )
{
mSnappingMarker.reset( new QgsVertexMarker( mCanvas ) );
mSnappingMarker->setPenWidth( 3 );
mSnappingMarker->setIconSize( QgsGuiUtils::scaleIconSize( 10 ) );
mSnappingMarker->setPenWidth( QgsGuiUtils::scaleIconSize( 3 ) );
}

QgsSettings s;

0 comments on commit eb0a020

Please sign in to comment.
You can’t perform that action at this time.