fixed inital scaling being wrong on windows
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "debug/log.hpp"
|
||||
#include "singletons/settingsmanager.hpp"
|
||||
#include "singletons/thememanager.hpp"
|
||||
#include "widgets/basewindow.hpp"
|
||||
|
||||
#include <QChildEvent>
|
||||
#include <QDebug>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user