From 640907198e29b03c7a39295f760407dad0990d16 Mon Sep 17 00:00:00 2001 From: fourtf Date: Sun, 24 Jun 2018 21:59:13 +0200 Subject: [PATCH] I keep pushing too fast --- src/widgets/basewindow.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/widgets/basewindow.cpp b/src/widgets/basewindow.cpp index ec7d14053..cf55d39a0 100644 --- a/src/widgets/basewindow.cpp +++ b/src/widgets/basewindow.cpp @@ -467,12 +467,14 @@ bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message, long *r } break; case WM_SIZE: { if (this->ui_.windowLayout) { - if (msg->wParam == SIZE_MAXIMIZED) { - auto offset = int(this->getScale() * 8); + if (this->hasCustomWindowFrame() && !this->frameless_) { + if (msg->wParam == SIZE_MAXIMIZED) { + auto offset = int(this->getScale() * 8); - this->ui_.windowLayout->setContentsMargins(offset, offset, offset, offset); - } else { - this->ui_.windowLayout->setContentsMargins(0, 1, 0, 0); + this->ui_.windowLayout->setContentsMargins(offset, offset, offset, offset); + } else { + this->ui_.windowLayout->setContentsMargins(0, 1, 0, 0); + } } }