Blame SOURCES/qtbase-hidpi_scale_at_192.patch
|
|
68351b |
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
|
|
|
68351b |
index 5e136b5..0ad2842 100644
|
|
|
68351b |
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
|
|
|
68351b |
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
|
|
|
68351b |
@@ -620,7 +620,7 @@ void QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation)
|
|
|
68351b |
m_sizeMillimeters = sizeInMillimeters(xGeometry.size(), virtualDpi());
|
|
|
68351b |
|
|
|
68351b |
qreal dpi = xGeometry.width() / physicalSize().width() * qreal(25.4);
|
|
|
68351b |
- m_pixelDensity = qMax(1, qRound(dpi/96));
|
|
|
68351b |
+ m_pixelDensity = qMax(1, (int) (dpi/96)); // instead of rounding at 1.5, round at 2.0 (same as GNOME)
|
|
|
68351b |
m_geometry = QRect(xGeometry.topLeft(), xGeometry.size());
|
|
|
68351b |
m_availableGeometry = xGeometry & m_virtualDesktop->workArea();
|
|
|
68351b |
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
|