diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-05-22 08:54:14 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-22 07:59:49 +0200 |
commit | eea02ff10da0ff6bba665df560c5404477b9f550 (patch) | |
tree | 4222b91ae33f9ce1337ec276951d468d9cecf563 /src/plugins/platforms/winrt/qwinrtwindow.cpp | |
parent | c32295eb8008c01b422fc04839b22e914786704f (diff) |
WinRT: Support High-DPI
Previously, the backing store and default framebuffer were created with
the logical screen resolution (in device-independent pixels), not the
the physical screen resolution. This lead to blurry text on high-DPI
devices. This change fixes this by creating those at full size, and
setting the device pixel ratio appropriately. Windows are still reported
in device-independent pixels, but text and images are now rendered
sharply for Qt Quick applications.
As QPainter does not support non-integer scaling, the backing store is
still drawn in DIPs and scaled by OpenGL.
Task-number: QTBUG-38464
Change-Id: I7377d4c734126825d670b8ebb65fd0dd1ef705f2
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtwindow.cpp')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtwindow.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtwindow.cpp b/src/plugins/platforms/winrt/qwinrtwindow.cpp index 88b753b463..80ee6bd761 100644 --- a/src/plugins/platforms/winrt/qwinrtwindow.cpp +++ b/src/plugins/platforms/winrt/qwinrtwindow.cpp @@ -116,4 +116,9 @@ void QWinRTWindow::lower() m_screen->lower(window()); } +qreal QWinRTWindow::devicePixelRatio() const +{ + return screen()->devicePixelRatio(); +} + QT_END_NAMESPACE |