From 8173b3d60db10a624740ee9d4ca3fc9190f6c335 Mon Sep 17 00:00:00 2001 From: fourtf Date: Wed, 23 May 2018 17:24:07 +0200 Subject: [PATCH] improved the window broder on windows 8 --- src/widgets/basewindow.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/widgets/basewindow.cpp b/src/widgets/basewindow.cpp index 7682c06b8..a1cd10421 100644 --- a/src/widgets/basewindow.cpp +++ b/src/widgets/basewindow.cpp @@ -302,10 +302,18 @@ bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message, long *r NCCALCSIZE_PARAMS *ncp = (reinterpret_cast(msg->lParam)); ncp->lppos->flags |= SWP_NOREDRAW; RECT *clientRect = &ncp->rgrc[0]; - clientRect->left += cx; - clientRect->top += 0; - clientRect->right -= cx; - clientRect->bottom -= cy; + + if (IsWindows10OrGreater()) { + clientRect->left += cx; + clientRect->top += 0; + clientRect->right -= cx; + clientRect->bottom -= cy; + } else { + clientRect->left += 1; + clientRect->top += 0; + clientRect->right -= 1; + clientRect->bottom -= 1; + } } *result = 0;