iOS: Implement QIOSScreen::logicalBaseDpi()

logicalDpi() and logicalBaseDpi() should return the
same DPI on iOS, in order to make Qt not apply a scale
factor.

Accomplish this by overriding logicalBaseDpi() instead
of logicalDpi(). The default QPlatformScreen::logicalDpi()
implementation will then call logicalBaseDpi().

Pick-to: 6.1
Fixes: QTBUG-92579
Change-Id: I7a27cf61f0154cef32098069ab3dfb29ad6acf27
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
bb10
Morten Sørvig 2021-04-29 16:05:14 +02:00 committed by Morten Johan Sørvig
parent f95d6bb09d
commit e3e070e87b
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ public:
int depth() const override;
QImage::Format format() const override;
QSizeF physicalSize() const override;
QDpi logicalDpi() const override;
QDpi logicalBaseDpi() const override;
qreal devicePixelRatio() const override;
qreal refreshRate() const override;

View File

@ -462,7 +462,7 @@ QSizeF QIOSScreen::physicalSize() const
return m_physicalSize;
}
QDpi QIOSScreen::logicalDpi() const
QDpi QIOSScreen::logicalBaseDpi() const
{
return QDpi(72, 72);
}