Skip to content

Commit

Permalink
Fixes #18043: Zoom and identify tools very small on MacOSX with retin…
Browse files Browse the repository at this point in the history
…a display
  • Loading branch information
slarosa committed Feb 21, 2018
1 parent 39cb0fb commit 3283afd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/qgsapplication.cpp
Expand Up @@ -556,6 +556,13 @@ QCursor QgsApplication::getThemeCursor( Cursor cursor )
{
// Apply scaling
float scale = Qgis::UI_SCALE_FACTOR * app->fontMetrics().height() / 32.0;
#ifdef Q_OS_MACX
if ( app->devicePixelRatio() >= 2 )
{
scale *= app->devicePixelRatio();
activeX = activeY = 5;
}
#endif
cursorIcon = QCursor( icon.pixmap( std::ceil( scale * 32 ), std::ceil( scale * 32 ) ), std::ceil( scale * activeX ), std::ceil( scale * activeY ) );
}
if ( app )
Expand Down

0 comments on commit 3283afd

Please sign in to comment.