mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixed inital scaling being wrong on windows
This commit is contained in:
parent
24471fc2d0
commit
683017008a
2 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue