Skip to content

Commit e24b6e6

Browse files
authored
Merge pull request #6404 from slarosa/cursor_size_fix
Fixes #18043: Zoom and identify tools very small on MacOSX with retina display
2 parents e155522 + 3283afd commit e24b6e6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/core/qgsapplication.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,13 @@ QCursor QgsApplication::getThemeCursor( Cursor cursor )
556556
{
557557
// Apply scaling
558558
float scale = Qgis::UI_SCALE_FACTOR * app->fontMetrics().height() / 32.0;
559+
#ifdef Q_OS_MACX
560+
if ( app->devicePixelRatio() >= 2 )
561+
{
562+
scale *= app->devicePixelRatio();
563+
activeX = activeY = 5;
564+
}
565+
#endif
559566
cursorIcon = QCursor( icon.pixmap( std::ceil( scale * 32 ), std::ceil( scale * 32 ) ), std::ceil( scale * activeX ), std::ceil( scale * activeY ) );
560567
}
561568
if ( app )

0 commit comments

Comments
 (0)