summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qwindowsstyle_p_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-07-18 10:53:41 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-07-27 17:20:51 +0000
commit29c6e39086831f6811e94364273c1f4bff119bef (patch)
tree4a4d36af0d994e72a59e39d88c1eb7dc4e9804bf /src/widgets/styles/qwindowsstyle_p_p.h
parent0e40781c1637f575acc842044b67da412c8e2026 (diff)
Windows style: Scale native metrics per monitor
The native sizes returned by the metrics and theme functions refer to the primary monitor. They need adaption when showing on a secondary monitor with differing logical DPI. Introduce a helper function QWindowsStylePrivate::nativeMetricScaleFactor() to calculate the total factor. Task-number: QTBUG-49374 Change-Id: I34c843ff34108424e1ef0aafcf9f563d17ebbc89 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/widgets/styles/qwindowsstyle_p_p.h')
-rw-r--r--src/widgets/styles/qwindowsstyle_p_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/styles/qwindowsstyle_p_p.h b/src/widgets/styles/qwindowsstyle_p_p.h
index 7971b84923..dc5a15db70 100644
--- a/src/widgets/styles/qwindowsstyle_p_p.h
+++ b/src/widgets/styles/qwindowsstyle_p_p.h
@@ -66,6 +66,7 @@ public:
static int fixedPixelMetric(QStyle::PixelMetric pm);
static qreal devicePixelRatio(const QWidget *widget = 0)
{ return widget ? widget->devicePixelRatioF() : QWindowsStylePrivate::appDevicePixelRatio(); }
+ static qreal nativeMetricScaleFactor(const QWidget *widget = Q_NULLPTR);
bool hasSeenAlt(const QWidget *widget) const;
bool altDown() const { return alt_down; }
@@ -98,3 +99,4 @@ QT_END_NAMESPACE
#endif // QT_NO_STYLE_WINDOWS
#endif //QWINDOWSSTYLE_P_P_H
+;