This commit is contained in:
朱子楚\zhuzi 2024-02-28 10:25:22 +08:00
parent e4413419b8
commit 4f2fcd8865

View File

@ -314,6 +314,9 @@ void FluFramelessHelper::componentComplete(){
_appBar.value<QObject*>()->setProperty("systemMoveEnable",false);
}
window->setFlags((window->flags()) | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);
if(resizeable()){
window->setFlag(Qt::WindowMaximizeButtonHint);
}
_nativeEvent =new FramelessEventFilter(this);
qApp->installNativeEventFilter(_nativeEvent);
HWND hwnd = reinterpret_cast<HWND>(window->winId());
@ -343,9 +346,7 @@ void FluFramelessHelper::componentComplete(){
#endif
int w = _realWidth.read().toInt();
int h = _realHeight.read().toInt()+_appBarHeight.read().toInt();
if(resizeable()){
window->setFlag(Qt::WindowMaximizeButtonHint);
}else{
if(!resizeable()){
window->setMaximumSize(QSize(w,h));
window->setMinimumSize(QSize(w,h));
}