qtbase-hidpi_scale_at_192.patch 833 B

1234567891011121314
  1. diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
  2. index ec0f9ba..6d0d7a6 100644
  3. --- a/src/plugins/platforms/xcb/qxcbscreen.cpp
  4. +++ src/plugins/platforms/xcb/qxcbscreen.cpp
  5. @@ -747,7 +747,7 @@ void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation)
  6. m_sizeMillimeters = sizeInMillimeters(geometry.size(), virtualDpi());
  7. qreal dpi = geometry.width() / physicalSize().width() * qreal(25.4);
  8. - m_pixelDensity = qMax(1, qRound(dpi/96));
  9. + m_pixelDensity = qMax(1, (int) (dpi/96)); // instead of rounding at 1.5, round at 2.0 (same as GNOME)
  10. m_geometry = geometry;
  11. m_availableGeometry = geometry & m_virtualDesktop->workArea();
  12. QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);