Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.6
-
None
-
macOS, Qt 5.6.4 from git
Description
Although setting a drag cursor is high-dpi/retina aware, updating the cursor with supplied QPixmap is not.
The problem is located in src/plugins/cocoa/qnsview.mm -
updateCursorFromDragResponse
does not take into account the devicePixleRatio of the source pixmap.
Here is the correct code (I also attach a "saved commit" which should work on 5.6.4).
@@ -1960,7 +1960,9 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin } } else { + QSize pmDeviceIndependentSize = pixmapCursor.size() / pixmapCursor.devicePixelRatio(); NSImage *nsimage = qt_mac_create_nsimage(pixmapCursor); + [nsimage setSize : qt_mac_toNSSize(pmDeviceIndependentSize)]; nativeCursor = [[NSCursor alloc] initWithImage:nsimage hotSpot:NSZeroPoint]; [nsimage release]; }
Attachments
Issue Links
- duplicates
-
QTBUG-60769 [macOS] High DPI drag cursor is scaled up 2x on retina display
-
- Closed
-