From 3a18f36d3f8c56042f6821c7aba6f75aba5d6262 Mon Sep 17 00:00:00 2001 From: Dylan Liu <312902918@qq.com> Date: Sat, 20 May 2023 21:01:23 +0800 Subject: [PATCH] Fix the native titlebar buttons don't show below Qt 6.2.4. (#226) --- src/core/utils_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/utils_mac.mm b/src/core/utils_mac.mm index d41ceba..f5eaa2f 100644 --- a/src/core/utils_mac.mm +++ b/src/core/utils_mac.mm @@ -362,7 +362,7 @@ public Q_SLOTS: nswindow.movableByWindowBackground = NO; nswindow.movable = NO; // 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:NSWindowMiniaturizeButton].hidden = (visible ? NO : YES); [nswindow standardWindowButton:NSWindowZoomButton].hidden = (visible ? NO : YES);