49 lines
3.1 KiB
Diff
49 lines
3.1 KiB
Diff
diff -up qtbase-opensource-src-5.7.1/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp.0295 qtbase-opensource-src-5.7.1/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp
|
|
--- qtbase-opensource-src-5.7.1/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp.0295 2017-02-09 07:41:56.976681266 -0600
|
|
+++ qtbase-opensource-src-5.7.1/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp 2017-02-09 07:43:31.812667108 -0600
|
|
@@ -222,7 +222,7 @@ QDpi QEGLDeviceIntegration::logicalDpi()
|
|
|
|
qreal QEGLDeviceIntegration::pixelDensity() const
|
|
{
|
|
- return qRound(logicalDpi().first / qreal(100));
|
|
+ return qMax(1, qRound(logicalDpi().first / qreal(100)));
|
|
}
|
|
|
|
Qt::ScreenOrientation QEGLDeviceIntegration::nativeOrientation() const
|
|
diff -up qtbase-opensource-src-5.7.1/src/plugins/platforms/windows/qwindowsscreen.cpp.0295 qtbase-opensource-src-5.7.1/src/plugins/platforms/windows/qwindowsscreen.cpp
|
|
--- qtbase-opensource-src-5.7.1/src/plugins/platforms/windows/qwindowsscreen.cpp.0295 2016-12-01 02:17:04.000000000 -0600
|
|
+++ qtbase-opensource-src-5.7.1/src/plugins/platforms/windows/qwindowsscreen.cpp 2017-02-09 07:41:56.976681266 -0600
|
|
@@ -264,7 +264,7 @@ qreal QWindowsScreen::pixelDensity() con
|
|
// the pixel density since it is reflects the Windows UI scaling.
|
|
// High DPI auto scaling should be disabled when the user chooses
|
|
// small fonts on a High DPI monitor, resulting in lower logical DPI.
|
|
- return qRound(logicalDpi().first / 96);
|
|
+ return qMax(1, qRound(logicalDpi().first / 96));
|
|
}
|
|
|
|
/*!
|
|
diff -up qtbase-opensource-src-5.7.1/src/plugins/platforms/winrt/qwinrtscreen.cpp.0295 qtbase-opensource-src-5.7.1/src/plugins/platforms/winrt/qwinrtscreen.cpp
|
|
--- qtbase-opensource-src-5.7.1/src/plugins/platforms/winrt/qwinrtscreen.cpp.0295 2016-12-01 02:17:04.000000000 -0600
|
|
+++ qtbase-opensource-src-5.7.1/src/plugins/platforms/winrt/qwinrtscreen.cpp 2017-02-09 07:41:56.976681266 -0600
|
|
@@ -644,7 +644,7 @@ QDpi QWinRTScreen::logicalDpi() const
|
|
qreal QWinRTScreen::pixelDensity() const
|
|
{
|
|
Q_D(const QWinRTScreen);
|
|
- return qRound(d->logicalDpi / 96);
|
|
+ return qMax(1, qRound(d->logicalDpi / 96));
|
|
}
|
|
|
|
qreal QWinRTScreen::scaleFactor() const
|
|
diff -up qtbase-opensource-src-5.7.1/src/plugins/platforms/xcb/qxcbscreen.cpp.0295 qtbase-opensource-src-5.7.1/src/plugins/platforms/xcb/qxcbscreen.cpp
|
|
--- qtbase-opensource-src-5.7.1/src/plugins/platforms/xcb/qxcbscreen.cpp.0295 2016-12-01 02:17:04.000000000 -0600
|
|
+++ qtbase-opensource-src-5.7.1/src/plugins/platforms/xcb/qxcbscreen.cpp 2017-02-09 07:41:56.977681276 -0600
|
|
@@ -633,7 +633,7 @@ void QXcbScreen::updateGeometry(const QR
|
|
m_sizeMillimeters = sizeInMillimeters(xGeometry.size(), virtualDpi());
|
|
|
|
qreal dpi = xGeometry.width() / physicalSize().width() * qreal(25.4);
|
|
- m_pixelDensity = qRound(dpi/96);
|
|
+ m_pixelDensity = qMax(1, qRound(dpi/96));
|
|
m_geometry = QRect(xGeometry.topLeft(), xGeometry.size());
|
|
m_availableGeometry = xGeometry & m_virtualDesktop->workArea();
|
|
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
|