Fix the native titlebar buttons don't show in Qt 6.0.0 - Qt 6.2.4. (#225)

This commit is contained in:
Dylan Liu 2023-05-20 19:57:00 +08:00 committed by GitHub
parent 2b1623fbd6
commit e48fc7e01f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -361,9 +361,11 @@ public Q_SLOTS:
nswindow.showsToolbarButton = NO;
nswindow.movableByWindowBackground = NO;
nswindow.movable = NO;
#if !(QT_VERSION >= QT_VERSION_CHECK(6,0,0) && QT_VERSION <= QT_VERSION_CHECK(6,2,4))
[nswindow standardWindowButton:NSWindowCloseButton].hidden = (visible ? NO : YES);
[nswindow standardWindowButton:NSWindowMiniaturizeButton].hidden = (visible ? NO : YES);
[nswindow standardWindowButton:NSWindowZoomButton].hidden = (visible ? NO : YES);
#endif
}
void setBlurBehindWindowEnabled(const bool enable)