Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/flathub/shared-modules.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2017-09-11 23:46:00 +0300
committerCosimo Cecchi <cosimoc@gnome.org>2017-09-11 23:46:00 +0300
commit716500ad743a704880eb75817fd3f4671417be7c (patch)
tree9d24f0dbff14f59d69598d0ea3ef2c266ba8dce5
parentec55d809882437b3a1e48cfb50984a9b93c8a969 (diff)
Import a patch from Fedora to fix HiDPi with QT5wip/fix-qt5-hidpi
-rw-r--r--qt5/qt5-qtbase.json4
-rw-r--r--qt5/qtbase-hidpi_scale_at_192.patch13
2 files changed, 17 insertions, 0 deletions
diff --git a/qt5/qt5-qtbase.json b/qt5/qt5-qtbase.json
index aa0c17e..c696799 100644
--- a/qt5/qt5-qtbase.json
+++ b/qt5/qt5-qtbase.json
@@ -58,6 +58,10 @@
"./configure.qt $processed"
],
"dest-filename": "configure"
+ },
+ {
+ "type": "patch",
+ "path": "qtbase-hidpi_scale_at_192.patch"
}
]
}
diff --git a/qt5/qtbase-hidpi_scale_at_192.patch b/qt5/qtbase-hidpi_scale_at_192.patch
new file mode 100644
index 0000000..c6c377d
--- /dev/null
+++ b/qt5/qtbase-hidpi_scale_at_192.patch
@@ -0,0 +1,13 @@
+diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
+index 5e136b5..0ad2842 100644
+--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
++++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
+@@ -620,7 +620,7 @@ void QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation)
+ m_sizeMillimeters = sizeInMillimeters(xGeometry.size(), virtualDpi());
+
+ qreal dpi = xGeometry.width() / physicalSize().width() * qreal(25.4);
+- m_pixelDensity = qMax(1, qRound(dpi/96));
++ m_pixelDensity = qMax(1, (int) (dpi/96)); // instead of rounding at 1.5, round at 2.0 (same as GNOME)
+ m_geometry = QRect(xGeometry.topLeft(), xGeometry.size());
+ m_availableGeometry = xGeometry & m_virtualDesktop->workArea();
+ QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);