diff --git a/src/FluFrameless.cpp b/src/FluFrameless.cpp index 8240bc0e..b0e90297 100644 --- a/src/FluFrameless.cpp +++ b/src/FluFrameless.cpp @@ -48,9 +48,8 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void * }else if(uMsg == WM_NCCALCSIZE){ #if QT_VERSION < QT_VERSION_CHECK(6,0,0) NCCALCSIZE_PARAMS& sz = *reinterpret_cast(msg->lParam); - if (sz.rgrc[0].top != 0) - sz.rgrc[0].top -= 1; *result = WVR_REDRAW; + sz.rgrc[0].top -= 1; return true; #endif } diff --git a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml index 84f0c7e5..f3c70f93 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml @@ -237,6 +237,7 @@ Window { } Rectangle{ anchors.fill: parent + anchors.topMargin: 1/Screen.devicePixelRatio color:"transparent" border.width: window.resizeBorderWidth border.color: window.resizeBorderColor @@ -249,15 +250,6 @@ Window { } return true } - Rectangle{ - color: parent.border.color - width: parent.width - height: 1 - anchors{ - top: parent.top - topMargin: 1 - } - } } function destoryOnClose(){ lifecycle.onDestoryOnClose()