mirror of https://github.com/qt/qtbase.git
Fix tst_QHighDpiScaling::scale
Without an override for logicalDpi() the base class implementation would use the geometry of the screen to figure out the DPI, and end up with ~100, which combined with a 96DPI base logical DPI would give a wrong scale factor. Change-Id: I68aecce44d2ee672c7b707dfe5444af8f551e961 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
da9a57a1e6
commit
756d7facf6
|
@ -47,6 +47,8 @@ public:
|
||||||
QRect geometry() const override { return QRect(3840, 0, 3840, 1920); }
|
QRect geometry() const override { return QRect(3840, 0, 3840, 1920); }
|
||||||
QRect availableGeometry() const override { return geometry(); }
|
QRect availableGeometry() const override { return geometry(); }
|
||||||
|
|
||||||
|
QDpi logicalDpi() const override { return logicalBaseDpi(); }
|
||||||
|
|
||||||
int depth() const override { return 32; }
|
int depth() const override { return 32; }
|
||||||
QImage::Format format() const override { return QImage::Format_ARGB32_Premultiplied; }
|
QImage::Format format() const override { return QImage::Format_ARGB32_Premultiplied; }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue