path: root/src/widgets/styles
diff options
authorFriedemann Kleint <>2019-09-12 09:32:02 +0200
committerFriedemann Kleint <>2019-09-16 10:48:38 +0200
commit9c76b82885253bbec9d9019b9113be16b15385f2 (patch)
treebaa3e3bfe8cbdbe2bf383de10c908bde4f95a3f0 /src/widgets/styles
parent72522517688d68a25a543a1da2497a4b8f6b424b (diff)
Windows style: Fix size of controls in multimonitor-setups with scaling disabled
The function calculating a correction for the size of windows metrics depending on screen would bail out when high DPI scaling was disabled. This is wrong since the correction is also needed in that case, delete the clause. Task-number: QTBUG-64890 Change-Id: Idef22e18fc616a211ccac48400490fc52393a338 Reviewed-by: Oliver Wolff <>
Diffstat (limited to 'src/widgets/styles')
1 files changed, 0 insertions, 2 deletions
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index 7d4e1fe9e7..8496a2c223 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -392,8 +392,6 @@ static QScreen *screenOf(const QWidget *w)
// and account for secondary screens with differing logical DPI.
qreal QWindowsStylePrivate::nativeMetricScaleFactor(const QWidget *widget)
- if (!QHighDpiScaling::isActive())
- return 1;
qreal result = qreal(1) / QWindowsStylePrivate::devicePixelRatio(widget);
if (QGuiApplicationPrivate::screen_list.size() > 1) {
const QScreen *primaryScreen = QGuiApplication::primaryScreen();