This commit is contained in:
朱子楚\zhuzi 2024-05-01 01:11:25 +08:00
parent e471d5a230
commit 0b1755e9eb
3 changed files with 8 additions and 5 deletions

View File

@ -162,8 +162,8 @@ void FluFrameless::componentComplete() {
} }
return false; return false;
} else if (uMsg == WM_NCCALCSIZE) { } else if (uMsg == WM_NCCALCSIZE) {
const auto clientRect = ((wParam == FALSE) ? reinterpret_cast<LPRECT>(lParam) : &(reinterpret_cast<LPNCCALCSIZE_PARAMS>(lParam))->rgrc[0]);
bool isMaximum = ::IsZoomed(hwnd); bool isMaximum = ::IsZoomed(hwnd);
const auto clientRect = ((wParam == FALSE) ? reinterpret_cast<LPRECT>(lParam) : &(reinterpret_cast<LPNCCALCSIZE_PARAMS>(lParam))->rgrc[0]);
const LONG originalTop = clientRect->top; const LONG originalTop = clientRect->top;
const LONG originalLeft = clientRect->left; const LONG originalLeft = clientRect->left;
const LONG originalBottom = clientRect->bottom; const LONG originalBottom = clientRect->bottom;
@ -186,6 +186,9 @@ void FluFrameless::componentComplete() {
clientRect->bottom = originalBottom - offsetXY; clientRect->bottom = originalBottom - offsetXY;
clientRect->left = originalLeft + offsetXY; clientRect->left = originalLeft + offsetXY;
clientRect->right = originalRight - offsetXY; clientRect->right = originalRight - offsetXY;
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0))
qWarning("This issue is Qt's own bug, which currently only exists in 6.5.3 and 6.6.0, and has been fixed in later versions");
#endif
} }
_setMaximizeHovered(false); _setMaximizeHovered(false);
*result = WVR_REDRAW; *result = WVR_REDRAW;

View File

@ -61,8 +61,8 @@ Window {
property var _windowRegister property var _windowRegister
property string _route property string _route
property bool _hideShadow: false property bool _hideShadow: false
id:window id: window
color:"transparent" color: FluTools.isSoftware() ? window.backgroundColor : "transparent"
Component.onCompleted: { Component.onCompleted: {
FluRouter.addWindow(window) FluRouter.addWindow(window)
useSystemAppBar = FluApp.useSystemAppBar useSystemAppBar = FluApp.useSystemAppBar

View File

@ -60,8 +60,8 @@ Window {
property var _windowRegister property var _windowRegister
property string _route property string _route
property bool _hideShadow: false property bool _hideShadow: false
id:window id: window
color:"transparent" color: FluTools.isSoftware() ? window.backgroundColor : "transparent"
Component.onCompleted: { Component.onCompleted: {
FluRouter.addWindow(window) FluRouter.addWindow(window)
useSystemAppBar = FluApp.useSystemAppBar useSystemAppBar = FluApp.useSystemAppBar