QScreen: Apply high-DPI scale to availableGeometry size, not position
Treat geometry and availableGeometry in the same way so the position is in native coordinates and only the size is scaled. Task-number: QTBUG-128660 Change-Id: If1355014fd6dd1a204cab7177d7941c980dda0ad Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
148f1a5a89
commit
a0f53ec970
@ -61,7 +61,8 @@ void QScreenPrivate::updateGeometry()
|
||||
qreal scaleFactor = QHighDpiScaling::factor(platformScreen);
|
||||
QRect nativeGeometry = platformScreen->geometry();
|
||||
geometry = QRect(nativeGeometry.topLeft(), QHighDpi::fromNative(nativeGeometry.size(), scaleFactor));
|
||||
availableGeometry = QHighDpi::fromNative(platformScreen->availableGeometry(), scaleFactor, geometry.topLeft());
|
||||
QRect nativeAvailableGeometry = platformScreen->availableGeometry();
|
||||
availableGeometry = QRect(nativeAvailableGeometry.topLeft(), QHighDpi::fromNative(nativeAvailableGeometry.size(), scaleFactor));
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
x
Reference in New Issue
Block a user