diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-07 10:47:20 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-07 10:47:20 +0200 |
commit | ee0951d69b38f766e67262487be95b88501aa4a5 (patch) | |
tree | 116c334060500be340d4d61c99026316b0df3ce9 /src/plugins/platforms/windows/qwindowscursor.cpp | |
parent | 0bb645b1ccc5a9d57b21cf0b2c4306b8e48c611c (diff) | |
parent | d37239aa419ee4adff4b0a8d5c1403cadff72319 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/network/access/qftp.cpp
src/widgets/itemviews/qheaderview.cpp
src/widgets/itemviews/qlistview.cpp
tests/auto/network/access/qftp/tst_qftp.cpp
Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscursor.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscursor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/windows/qwindowscursor.cpp b/src/plugins/platforms/windows/qwindowscursor.cpp index 0eb7043bbc..d02648fade 100644 --- a/src/plugins/platforms/windows/qwindowscursor.cpp +++ b/src/plugins/platforms/windows/qwindowscursor.cpp @@ -103,9 +103,9 @@ QWindowsPixmapCursorCacheKey::QWindowsPixmapCursorCacheKey(const QCursor &c) HCURSOR QWindowsCursor::createPixmapCursor(QPixmap pixmap, const QPoint &hotSpot, qreal scaleFactor) { HCURSOR cur = 0; - scaleFactor /= pixmap.devicePixelRatioF(); - if (!qFuzzyCompare(scaleFactor, 1)) { - pixmap = pixmap.scaled((scaleFactor * QSizeF(pixmap.size())).toSize(), + const qreal pixmapScaleFactor = scaleFactor / pixmap.devicePixelRatioF(); + if (!qFuzzyCompare(pixmapScaleFactor, 1)) { + pixmap = pixmap.scaled((pixmapScaleFactor * QSizeF(pixmap.size())).toSize(), Qt::KeepAspectRatio, Qt::SmoothTransformation); } QBitmap mask = pixmap.mask(); @@ -119,8 +119,8 @@ HCURSOR QWindowsCursor::createPixmapCursor(QPixmap pixmap, const QPoint &hotSpot ICONINFO ii; ii.fIcon = 0; - ii.xHotspot = DWORD(hotSpot.x()); - ii.yHotspot = DWORD(hotSpot.y()); + ii.xHotspot = DWORD(qRound(hotSpot.x() * scaleFactor)); + ii.yHotspot = DWORD(qRound(hotSpot.y() * scaleFactor)); ii.hbmMask = im; ii.hbmColor = ic; |