From d98415dd6b7219d853571f135cf7373de2c3a7c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 16 Nov 2015 13:41:40 +0000 Subject: eglfs: Enable use of Qt::AA_EnableHighDpiScaling Support use of Qt::AA_EnableHighDpiScaling and QT_AUTO_SCREEN_SCALE_FACTOR. This makes the high-dpi scaling system use the screen configuration set with QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT. Implement QEglFSScreen::pixelDensity() and make it return the scale factor for the display. The scale factor is computed as the ratio of the logical DPI to the base DPI. Change-Id: I14ed5da058024128479cb5508e056c39bd2f7563 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/eglfs/qeglfsscreen.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/plugins/platforms/eglfs/qeglfsscreen.cpp') diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/qeglfsscreen.cpp index 6f8d0b88dd..a14e68b667 100644 --- a/src/plugins/platforms/eglfs/qeglfsscreen.cpp +++ b/src/plugins/platforms/eglfs/qeglfsscreen.cpp @@ -82,6 +82,11 @@ QDpi QEglFSScreen::logicalDpi() const return qt_egl_device_integration()->logicalDpi(); } +qreal QEglFSScreen::pixelDensity() const +{ + return qt_egl_device_integration()->pixelDensity(); +} + Qt::ScreenOrientation QEglFSScreen::nativeOrientation() const { return qt_egl_device_integration()->nativeOrientation(); -- cgit v1.2.3