Skip to content

Commit

Permalink
Merge pull request #6404 from slarosa/cursor_size_fix
Browse files Browse the repository at this point in the history
Fixes #18043: Zoom and identify tools very small on MacOSX with retina display
  • Loading branch information
nyalldawson committed Feb 22, 2018
2 parents e155522 + 3283afd commit e24b6e6
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 e24b6e6

Please sign in to comment.