From 56952436f40e573008b1223a52da1a3abe9642ff Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Thu, 4 Jun 2015 14:24:35 +0200 Subject: dirty hack to make setScreenFactor work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a seriously dirty hack, but without this, screen geometries will be wrong when scale factors are changed after application startup. Change-Id: Ia39164303ef648ec3752d7f4b9db06477a2d3fb4 Reviewed-by: Morten Johan Sørvig --- src/gui/kernel/qhighdpiscaling.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/kernel/qhighdpiscaling.cpp') diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp index 20c7c6ca2a..56fd38486d 100644 --- a/src/gui/kernel/qhighdpiscaling.cpp +++ b/src/gui/kernel/qhighdpiscaling.cpp @@ -170,6 +170,10 @@ void QHighDpiScaling::setScreenFactor(QScreen *screen, qreal factor) m_active = true; m_perScreenActive = true; screen->setProperty(scaleFactorProperty, QVariant(factor)); + + //### dirty hack to force re-evaluation of screen geometry + if (screen->handle()) + screen->d_func()->setPlatformScreen(screen->handle()); // update geometries based on scale factor } /* -- cgit v1.2.3