diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-06-04 14:24:35 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-06-17 10:49:21 +0000 |
commit | 56952436f40e573008b1223a52da1a3abe9642ff (patch) | |
tree | eef0da29990de9c09256c8134ac93c9e98b1a0ae /src/gui/kernel/qhighdpiscaling.cpp | |
parent | 00d5e68de4cfd415ba5d8638ac5fd38272f115bc (diff) |
dirty hack to make setScreenFactor work
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 <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qhighdpiscaling.cpp')
-rw-r--r-- | src/gui/kernel/qhighdpiscaling.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 } /* |