From bb19554215dc3ac374f84f471bf732496def5a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Wed, 3 Jan 2024 21:21:33 +0800 Subject: [PATCH] update --- src/FluFramelessHelper.cpp | 7 ++----- src/Qt5/imports/FluentUI/Controls/FluWindow.qml | 1 - src/Qt6/imports/FluentUI/Controls/FluWindow.qml | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/FluFramelessHelper.cpp b/src/FluFramelessHelper.cpp index daeeffee..0a07693a 100644 --- a/src/FluFramelessHelper.cpp +++ b/src/FluFramelessHelper.cpp @@ -116,9 +116,7 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void * }else if(uMsg == WM_NCCALCSIZE){ const auto clientRect = ((wParam == FALSE) ? reinterpret_cast(lParam) : &(reinterpret_cast(lParam))->rgrc[0]); const LONG originalTop = clientRect->top; - const LONG originalBottom = clientRect->bottom; const LONG originalLeft = clientRect->left; - const LONG originalRight = clientRect->right; const LRESULT hitTestResult = ::DefWindowProcW(hwnd, WM_NCCALCSIZE, wParam, lParam); if ((hitTestResult != HTERROR) && (hitTestResult != HTNOWHERE)) { *result = hitTestResult; @@ -141,7 +139,6 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void * } } clientRect->top = originalTop+offsetTop; - clientRect->bottom = originalBottom-offsetTop; *result = WVR_REDRAW; return true; }if(uMsg == WM_NCHITTEST){ @@ -300,9 +297,9 @@ void FluFramelessHelper::componentComplete(){ HWND hwnd = reinterpret_cast(window->winId()); DWORD style = ::GetWindowLong(hwnd, GWL_STYLE); if(resizeable()){ - SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME | WS_BORDER); + SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME); }else{ - SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME | WS_BORDER); + SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME); } SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); showShadow(hwnd); diff --git a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml index d85f7a0f..31f4b7b8 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml @@ -209,7 +209,6 @@ Window { anchors{ fill:parent topMargin: _offsetXY.y - bottomMargin: _offsetXY.y } onWidthChanged: { window.appBar.width = width diff --git a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml index b188c11c..65ed022f 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml @@ -208,7 +208,6 @@ Window { anchors{ fill:parent topMargin: _offsetXY.y - bottomMargin: _offsetXY.y } onWidthChanged: { window.appBar.width = width