iOS: Enable retina resolution for styles
The QStyle code uses the global qApp->devicePixelRatio(), which queries the screen, not the window. Implement QIOSScreen::devicePixelRatio(). Change-Id: I0091e5793f8d07ab7a46b6de443edd9457dcff85 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
parent
58415530aa
commit
60685407c2
@ -64,6 +64,7 @@ public:
|
||||
QImage::Format format() const;
|
||||
QSizeF physicalSize() const;
|
||||
QDpi logicalDpi() const;
|
||||
qreal devicePixelRatio() const;
|
||||
|
||||
Qt::ScreenOrientation nativeOrientation() const;
|
||||
Qt::ScreenOrientation orientation() const;
|
||||
|
@ -183,6 +183,11 @@ QDpi QIOSScreen::logicalDpi() const
|
||||
return QDpi(72, 72);
|
||||
}
|
||||
|
||||
qreal QIOSScreen::devicePixelRatio() const
|
||||
{
|
||||
return [m_uiScreen scale];
|
||||
}
|
||||
|
||||
Qt::ScreenOrientation QIOSScreen::nativeOrientation() const
|
||||
{
|
||||
return Qt::PortraitOrientation;
|
||||
|
Loading…
Reference in New Issue
Block a user