Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ui] More hidpi-compatibility work for the vertex tool
  • Loading branch information
nirvn committed Feb 4, 2019
1 parent 0250cab commit d3daa86
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/app/vertextool/qgsselectedfeature.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
}
Expand Down
5 changes: 4 additions & 1 deletion src/app/vertextool/qgsvertexentry.cpp
Expand Up @@ -14,6 +14,8 @@
***************************************************************************/

#include "vertextool/qgsvertexentry.h"

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

Expand Down Expand Up @@ -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 );
}

Expand Down
4 changes: 3 additions & 1 deletion src/gui/qgssnapindicator.cpp
Expand Up @@ -15,6 +15,7 @@

#include "qgssnapindicator.h"

#include "qgsguiutils.h"
#include "qgsmapcanvas.h"
#include "qgssettings.h"
#include "qgsvectorlayer.h"
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d3daa86

Please sign in to comment.