diff --git a/src/widgets/basewidget.cpp b/src/widgets/basewidget.cpp index 5a1c5b0c3..d051984ce 100644 --- a/src/widgets/basewidget.cpp +++ b/src/widgets/basewidget.cpp @@ -4,6 +4,7 @@ #include "debug/log.hpp" #include "singletons/settingsmanager.hpp" #include "singletons/thememanager.hpp" +#include "widgets/basewindow.hpp" #include #include diff --git a/src/widgets/basewindow.cpp b/src/widgets/basewindow.cpp index 150f86c9f..9acf6d340 100644 --- a/src/widgets/basewindow.cpp +++ b/src/widgets/basewindow.cpp @@ -427,6 +427,14 @@ bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message, long *r return true; } + case WM_SHOWWINDOW: { + float scale = GetDpiForWindow(msg->hwnd) / 96.f; + + this->nativeScale_ = scale; + this->updateScale(); + + return true; + } case WM_NCCALCSIZE: { if (this->hasCustomWindowFrame()) { int cx = GetSystemMetrics(SM_CXSIZEFRAME);