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(). Fixes: QTBUG-92579 Change-Id: I7a27cf61f0154cef32098069ab3dfb29ad6acf27 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit e3e070e87b3a8036f7200755ba32b57437304ee6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9d6245e921
commit
207b9346f7
@ -67,7 +67,7 @@ public:
|
|||||||
int depth() const override;
|
int depth() const override;
|
||||||
QImage::Format format() const override;
|
QImage::Format format() const override;
|
||||||
QSizeF physicalSize() const override;
|
QSizeF physicalSize() const override;
|
||||||
QDpi logicalDpi() const override;
|
QDpi logicalBaseDpi() const override;
|
||||||
qreal devicePixelRatio() const override;
|
qreal devicePixelRatio() const override;
|
||||||
qreal refreshRate() const override;
|
qreal refreshRate() const override;
|
||||||
|
|
||||||
|
@ -462,7 +462,7 @@ QSizeF QIOSScreen::physicalSize() const
|
|||||||
return m_physicalSize;
|
return m_physicalSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDpi QIOSScreen::logicalDpi() const
|
QDpi QIOSScreen::logicalBaseDpi() const
|
||||||
{
|
{
|
||||||
return QDpi(72, 72);
|
return QDpi(72, 72);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user