From e471d5a230eeff0d26239b73ff92840a7eabe254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Tue, 30 Apr 2024 19:38:05 +0800 Subject: [PATCH] update --- src/FluFrameless.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/FluFrameless.cpp b/src/FluFrameless.cpp index 799b8627..1b6ce37b 100644 --- a/src/FluFrameless.cpp +++ b/src/FluFrameless.cpp @@ -7,6 +7,7 @@ #include "FluTools.h" #ifdef Q_OS_WIN + #pragma comment (lib, "user32.lib") #pragma comment (lib, "dwmapi.lib") @@ -14,7 +15,6 @@ #include #include - static inline QByteArray qtNativeEventType() { static const auto result = "windows_generic_MSG"; return result; @@ -48,7 +48,6 @@ static inline void setShadow(HWND hwnd) { } } - #endif bool containsCursorToItem(QQuickItem *item) { @@ -174,7 +173,7 @@ void FluFrameless::componentComplete() { *result = static_cast(hitTestResult); return true; } - if(clientRect->left - originalLeft != 0){ + if (clientRect->left - originalLeft != 0) { offsetXY = clientRect->left - originalLeft; } if (!isMaximum) { @@ -183,10 +182,10 @@ void FluFrameless::componentComplete() { clientRect->left = originalLeft; clientRect->right = originalRight; } else { - clientRect->top = originalTop+offsetXY; - clientRect->bottom = originalBottom-offsetXY; - clientRect->left = originalLeft+offsetXY; - clientRect->right = originalRight-offsetXY; + clientRect->top = originalTop + offsetXY; + clientRect->bottom = originalBottom - offsetXY; + clientRect->left = originalLeft + offsetXY; + clientRect->right = originalRight - offsetXY; } _setMaximizeHovered(false); *result = WVR_REDRAW;