diff options
Diffstat (limited to 'src/gui/kernel/qscreen_p.h')
-rw-r--r-- | src/gui/kernel/qscreen_p.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/gui/kernel/qscreen_p.h b/src/gui/kernel/qscreen_p.h index d341b71932..4492eddd45 100644 --- a/src/gui/kernel/qscreen_p.h +++ b/src/gui/kernel/qscreen_p.h @@ -47,6 +47,7 @@ #include <QtGui/qscreen.h> #include <qpa/qplatformscreen.h> +#include "qhighdpiscaling_p.h" #include <QtCore/private/qobject_p.h> @@ -54,25 +55,19 @@ QT_BEGIN_NAMESPACE class QScreenPrivate : public QObjectPrivate { + Q_DECLARE_PUBLIC(QScreen) public: - QScreenPrivate(QPlatformScreen *screen) - : platformScreen(screen) + QScreenPrivate() + : platformScreen(0) , orientationUpdateMask(0) { - orientation = platformScreen->orientation(); - geometry = platformScreen->geometry(); - availableGeometry = platformScreen->availableGeometry(); - logicalDpi = platformScreen->logicalDpi(); - refreshRate = platformScreen->refreshRate(); - // safeguard ourselves against buggy platform behavior... - if (refreshRate < 1.0) - refreshRate = 60.0; - - updatePrimaryOrientation(); + } - filteredOrientation = orientation; - if (filteredOrientation == Qt::PrimaryOrientation) - filteredOrientation = primaryOrientation; + void setPlatformScreen(QPlatformScreen *screen); + void updateHighDpi() + { + geometry = platformScreen->deviceIndependentGeometry(); + availableGeometry = QHighDpi::fromNative(platformScreen->availableGeometry(), QHighDpiScaling::factor(platformScreen), geometry.topLeft()); } void updatePrimaryOrientation(); |