diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-06-29 10:25:24 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-07-30 12:44:58 +0000 |
commit | fd6821740fece8650cac7494a2cffe63e2bebb9c (patch) | |
tree | 15f5dddd919ad3cad52a6cf1cd554fd54e0e0635 /src/plugins/platforms/windows/qwindowsintegration.cpp | |
parent | a705b4ec1f6f7133390054f8b6b8077ef0550311 (diff) |
Highdpi changes for Windows
Adapt the Windows plugin to work with the new cross-platform
high-DPI scaling.
Task-number: QTBUG-38993
Task-number: QTBUG-46615
Change-Id: I108d319255925a290b75611e95ef006d4aaf7ace
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsintegration.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsintegration.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 26e071cba1..05c7e6b240 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -63,6 +63,7 @@ # include "qwindowssessionmanager.h" #endif #include <QtGui/private/qguiapplication_p.h> +#include <QtGui/private/qhighdpiscaling_p.h> #include <QtGui/qpa/qplatforminputcontextfactory_p.h> #include <QtCore/private/qeventdispatcher_win_p.h> @@ -302,7 +303,7 @@ QWindowsWindowData QWindowsIntegration::createWindowData(QWindow *window) const { QWindowsWindowData requested; requested.flags = window->flags(); - requested.geometry = window->geometry(); + requested.geometry = QHighDpi::toNativePixels(window->geometry(), window); // Apply custom margins (see QWindowsWindow::setCustomMargins())). const QVariant customMarginsV = window->property("_q_windowsCustomMargins"); if (customMarginsV.isValid()) |