diff options
-rw-r--r-- | src/webview/qwebview_winrt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/webview/qwebview_winrt.cpp b/src/webview/qwebview_winrt.cpp index eb78439..5895ec4 100644 --- a/src/webview/qwebview_winrt.cpp +++ b/src/webview/qwebview_winrt.cpp @@ -45,6 +45,7 @@ #include <QScreen> #include <qfunctions_winrt.h> #include <private/qeventdispatcher_winrt_p.h> +#include <private/qhighdpiscaling_p.h> #include <wrl.h> #include <windows.graphics.display.h> @@ -488,8 +489,8 @@ void QWinRTWebViewPrivate::setGeometry(const QRect &geometry) const QScreen *screen = d->window->screen(); Q_ASSERT(screen); const QPoint screenTopLeft = screen->availableGeometry().topLeft(); - const QPointF topLeft = QPointF(geometry.topLeft() + screenTopLeft) * scaleFactor; - const QSizeF size = QSizeF(geometry.size()) * scaleFactor; + const QPointF topLeft = QHighDpi::toNativePixels(QPointF(geometry.topLeft() + screenTopLeft) * scaleFactor, screen); + const QSizeF size = QHighDpi::toNativePixels(QSizeF(geometry.size()) * scaleFactor, screen); #else ResolutionScale resolutionScale; hr = d->displayInformation->get_ResolutionScale(&resolutionScale); |