diff --git a/src/FluFramelessHelper.cpp b/src/FluFramelessHelper.cpp index efb0d945..c7a2a2e2 100644 --- a/src/FluFramelessHelper.cpp +++ b/src/FluFramelessHelper.cpp @@ -81,10 +81,10 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void * return true; } int offsetSize = 0; - bool isMax = IsZoomed(hwnd); + bool isMaximum = IsZoomed(hwnd); offsetXY = QPoint(abs(clientRect->left - originalLeft),abs(clientRect->top - originalTop)); if(isCompositionEnabled()){ - if(isMax){ + if(isMaximum){ _helper->setOriginalPos(QPoint(originalLeft,originalTop)); offsetSize = 0; }else{ @@ -96,9 +96,11 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void * } clientRect->top = originalTop+offsetSize; #if QT_VERSION < QT_VERSION_CHECK(6,0,0) - clientRect->bottom = originalBottom-offsetSize; - clientRect->left = originalLeft+offsetSize; - clientRect->right = originalRight-offsetSize; + if(!isMaximum){ + clientRect->bottom = originalBottom-offsetSize; + clientRect->left = originalLeft+offsetSize; + clientRect->right = originalRight-offsetSize; + } #endif *result = WVR_REDRAW; return true; diff --git a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml index 51516d53..536c80a0 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml @@ -206,12 +206,13 @@ Window { } Item{ id:layout_container + property bool isMaximum : window.visibility == Window.Maximized anchors{ fill:parent topMargin: _offsetXY.y - bottomMargin: _offsetXY.y - leftMargin: _offsetXY.x - rightMargin: _offsetXY.x + bottomMargin: isMaximum ? 0 : _offsetXY.y + leftMargin: isMaximum ? 0 :_offsetXY.x + rightMargin: isMaximum ? 0 : _offsetXY.x } onWidthChanged: { window.appBar.width = width