Commit c4ce48d9 authored by Dmitry Shachnev's avatar Dmitry Shachnev 🐧

Replace hidpi_scale_at_192.diff with the applied upstream version.

Closes: #884956.
parent 29af2bf5
......@@ -6,6 +6,8 @@ qtbase-opensource-src (5.10.1+dfsg-6) UNRELEASED; urgency=medium
[ Dmitry Shachnev ]
* Backport upstream patch to fix loading OpenGL library in the GLX
integration plugin (closes: #886400).
* Replace hidpi_scale_at_192.diff with a version that has been applied
upstream (closes: #884956).
-- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Sun, 08 Apr 2018 11:21:11 -0500
......
Description: Fix HiDPI round pixel density by 2.0 instead of 1.5.
Origin: https://src.fedoraproject.org/rpms/qt5-qtbase/blame/qtbase-hidpi_scale_at_192.patch?identifier=master
Author: Martin Briza
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1381828
Description: xcb: round down the scale factor for values < N + 0.8
Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=23b139038a1dc9a7
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884956
Forwarded: no
---
src/plugins/platforms/xcb/qxcbscreen.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Last-Update: 2018-05-02
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -754,7 +754,7 @@
@@ -754,7 +754,12 @@ void QXcbScreen::updateGeometry(const QR
m_sizeMillimeters = sizeInMillimeters(geometry.size(), virtualDpi());
qreal dpi = geometry.width() / physicalSize().width() * qreal(25.4);
- m_pixelDensity = qMax(1, qRound(dpi/96));
+ m_pixelDensity = qMax(1, (int) (dpi/96));
+ qreal rawFactor = dpi/96;
+ int roundedFactor = qFloor(rawFactor);
+ // Round up for .8 and higher. This favors "small UI" over "large UI".
+ if (rawFactor - roundedFactor >= 0.8)
+ roundedFactor = qCeil(rawFactor);
+ m_pixelDensity = qMax(1, roundedFactor);
m_geometry = geometry;
m_availableGeometry = geometry & m_virtualDesktop->workArea();
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
......@@ -4,6 +4,7 @@ extend_mariadb_define_check.diff
resources_for_examples.diff
mesa_18.diff
fix_loading_opengl.diff
hidpi_scale_at_192.diff
# Debian specific.
gnukfreebsd.diff
......@@ -14,6 +15,3 @@ gnukfreebsd_linker_warnings.diff
armv4.diff
nonlinux_utime.diff
no_arc4random_buf.diff
# Not yet forwarded.
hidpi_scale_at_192.diff
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment