From 4dc4a37360d525bb8c118bb818f4825458d1956f Mon Sep 17 00:00:00 2001 From: fourtf Date: Mon, 26 Aug 2019 22:29:54 +0200 Subject: [PATCH] fixed fullscreen window margin --- lib/appbase/widgets/BaseWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/appbase/widgets/BaseWindow.cpp b/lib/appbase/widgets/BaseWindow.cpp index 51d5d918..d6ed1e8e 100644 --- a/lib/appbase/widgets/BaseWindow.cpp +++ b/lib/appbase/widgets/BaseWindow.cpp @@ -760,7 +760,8 @@ bool BaseWindow::handleSIZE(MSG *msg) { if (msg->wParam == SIZE_MAXIMIZED) { - auto offset = int(this->scale() * 8); + auto offset = int( + getWindowDpi(HWND(this->winId())).value_or(96) * 8 / 96); this->ui_.windowLayout->setContentsMargins(offset, offset, offset, offset);