diff options
author | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2016-01-12 13:02:05 +0100 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2016-01-13 12:55:15 +0000 |
commit | eef772577594b59d9cee5d55da5c47cd81008735 (patch) | |
tree | 0b02139d1ccbe7ad49e9e917f65dee2ee2b0cd0c /src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp | |
parent | 8c89a8b1ef3e4ce549a5d0bbc4168c199e44f8cf (diff) |
eglfs: Round value returned from pixelDensity()
Avoid returning fractional scale factors, which we
do not support. This matches the pixelDensity()
implementation for the Xcb and Windows platform plugins.
Change-Id: I79156e802a0a436b9344f12d35d1f4861e20e7fa
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp b/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp index 8af48a893b..1fb6020d69 100644 --- a/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp @@ -224,7 +224,7 @@ QDpi QEGLDeviceIntegration::logicalDpi() const qreal QEGLDeviceIntegration::pixelDensity() const { - return logicalDpi().first / qreal(100); + return qRound(logicalDpi().first / qreal(100)); } Qt::ScreenOrientation QEGLDeviceIntegration::nativeOrientation() const |