Change the hidpi cursor hotspot coordinate mapping

All hidpi coordinates in Qt are device independent points and
the hidpi cursor hotspot should follow that convention.

Change-Id: Id5295cae7a463e9a3ea85d2b0a18a5020dc97656
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Kari Pihkala 2014-03-18 10:16:19 +02:00 committed by The Qt Project
parent acebf67712
commit bdf55f62a2

View File

@ -308,8 +308,7 @@ NSCursor *QCocoaCursor::createCursorFromBitmap(const QBitmap *bitmap, const QBit
NSCursor *QCocoaCursor::createCursorFromPixmap(const QPixmap pixmap, const QPoint hotspot)
{
NSPoint hotSpot = NSMakePoint(hotspot.x() / pixmap.devicePixelRatio(),
hotspot.y() / pixmap.devicePixelRatio());
NSPoint hotSpot = NSMakePoint(hotspot.x(), hotspot.y());
NSImage *nsimage;
if (pixmap.devicePixelRatio() > 1.0) {
QSize layoutSize = pixmap.size() / pixmap.devicePixelRatio();