This commit is contained in:
zhuzichu 2023-12-15 16:45:59 +08:00
parent 95f48b51bf
commit 136e2c72af
2 changed files with 2 additions and 11 deletions

View File

@ -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<NCCALCSIZE_PARAMS*>(msg->lParam);
if (sz.rgrc[0].top != 0)
sz.rgrc[0].top -= 1;
*result = WVR_REDRAW;
sz.rgrc[0].top -= 1;
return true;
#endif
}

View File

@ -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()