diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-11-19 13:39:52 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-11-23 13:15:30 +0000 |
commit | 05c8e51d884d7130e3f26701a7955ebc2026bb12 (patch) | |
tree | 1525c3aa90e43e6b51cc4a89952150c4d73dbfb5 /src/plugins/platforms/windows/qwindowscursor.h | |
parent | 36bb6d266e08ff4ae3c45d2ad428f7f787746b8a (diff) |
Windows: Scale cursors from resource pixmaps according to screen.
QWindowsCursor::customCursor() uses a best match algorithm to
find the most suitable pixmap for the cursor size obtained
from GetSystemMetrics(). This size is correct for the primary
screen only; in High DPI + normal monitor multiscreen-environments,
the cursors will be too large on the secondary monitor.
Pass the platform screen to apply a correction factor based on
logical DPI to obtain the correct size.
Task-number: QTBUG-49511
Change-Id: I8a64a969e3ade7ab5029e3ae904a0bcbb4704f90
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscursor.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscursor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowscursor.h b/src/plugins/platforms/windows/qwindowscursor.h index ac4462f131..558e807201 100644 --- a/src/plugins/platforms/windows/qwindowscursor.h +++ b/src/plugins/platforms/windows/qwindowscursor.h @@ -104,9 +104,9 @@ public: static HCURSOR createPixmapCursor(QPixmap pixmap, const QPoint &hotSpot, qreal scaleFactor = 1); static HCURSOR createPixmapCursor(const PixmapCursor &pc, qreal scaleFactor = 1) { return createPixmapCursor(pc.pixmap, pc.hotSpot, scaleFactor); } - static PixmapCursor customCursor(Qt::CursorShape cursorShape); + static PixmapCursor customCursor(Qt::CursorShape cursorShape, const QPlatformScreen *screen = Q_NULLPTR); - static HCURSOR createCursorFromShape(Qt::CursorShape cursorShape); + static HCURSOR createCursorFromShape(Qt::CursorShape cursorShape, const QPlatformScreen *screen = Q_NULLPTR); static QPoint mousePosition(); static CursorState cursorState(); |