Fix the native titlebar buttons don't show below Qt 6.2.4. (#226)

This commit is contained in:
Dylan Liu 2023-05-20 21:01:23 +08:00 committed by GitHub
parent 9df1e9d7b5
commit 3a18f36d3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -362,7 +362,7 @@ public Q_SLOTS:
nswindow.movableByWindowBackground = NO; nswindow.movableByWindowBackground = NO;
nswindow.movable = NO; nswindow.movable = NO;
// For some unknown reason, we don't need the following hack in some specific Qt versions. // For some unknown reason, we don't need the following hack in some specific Qt versions.
#if !(QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && QT_VERSION <= QT_VERSION_CHECK(6, 2, 4)) #if QT_VERSION > QT_VERSION_CHECK(6, 2, 4)
[nswindow standardWindowButton:NSWindowCloseButton].hidden = (visible ? NO : YES); [nswindow standardWindowButton:NSWindowCloseButton].hidden = (visible ? NO : YES);
[nswindow standardWindowButton:NSWindowMiniaturizeButton].hidden = (visible ? NO : YES); [nswindow standardWindowButton:NSWindowMiniaturizeButton].hidden = (visible ? NO : YES);
[nswindow standardWindowButton:NSWindowZoomButton].hidden = (visible ? NO : YES); [nswindow standardWindowButton:NSWindowZoomButton].hidden = (visible ? NO : YES);