diff options
author | Jungi Byun <jungi.byun@lge.com> | 2021-01-27 08:24:23 +0900 |
---|---|---|
committer | Elvis Lee <kwangwoong.lee@lge.com> | 2021-03-25 15:30:21 +0900 |
commit | cf98abbc6ae9ba9373803ffe193f839324e0c80b (patch) | |
tree | 0c51b19bfeccd13a9e8c62e3c2986ac5e5c83b8e /src/hardwareintegration | |
parent | e08b25efe4a7bec1004696bd23d9f8959158bd60 (diff) | |
download | qtwayland-cf98abbc6ae9ba9373803ffe193f839324e0c80b.tar.gz |
Replace scale with devicePixelRatio for non-integer scaling
The 'scale' event from wayland cannot support non-integer scaling
which was originally supported in Qt.
As default, devicePixelRatio follows the 'scale' so that the high DPI
still works as the mechanism in Wayland. But if non-integer scaling
factor such as 150% is needed, it can be supported to override the
devicePixelRatio.
Change-Id: I63a04db27bd521264b6d0904e1ddd05a572dc970
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Jungi Byun <jungi.byun@lge.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/hardwareintegration')
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index 68f95d30..9e6c1188 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp @@ -196,7 +196,7 @@ public: QOpenGLTextureCache *cache = QOpenGLTextureCache::cacheForContext(m_context->context()); QSize surfaceSize = window->surfaceSize(); - int scale = window->scale() ; + qreal scale = window->scale() ; glViewport(0, 0, surfaceSize.width() * scale, surfaceSize.height() * scale); //Draw Decoration |