From 9dcea027f16c4ce5852da3dfc8aca284c582bd7d Mon Sep 17 00:00:00 2001
From: sola.lu <sola.lu.greentest.com.cn>
Date: 周五, 06 6月 2025 18:19:18 +0800
Subject: [PATCH] 1.注释掉custom margin,解决程序放大后,遮盖窗口底部内容的问题。

---
 src/core/contexts/cocoawindowcontext.mm |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/core/contexts/cocoawindowcontext.mm b/src/core/contexts/cocoawindowcontext.mm
index 28738c6..dbf260e 100644
--- a/src/core/contexts/cocoawindowcontext.mm
+++ b/src/core/contexts/cocoawindowcontext.mm
@@ -745,7 +745,11 @@
         Q_ASSERT(m_windowId);
 
         if (key == QStringLiteral("no-system-buttons")) {
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
             if (attribute.type() != QVariant::Bool)
+#else
+            if (attribute.typeId() != QMetaType::Type::Bool)
+#endif
                 return false;
             ensureWindowProxy(m_windowId)->setSystemButtonVisible(!attribute.toBool());
             return true;
@@ -753,14 +757,22 @@
 
         if (key == QStringLiteral("blur-effect")) {
             auto mode = NSWindowProxy::BlurMode::None;
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
             if (attribute.type() == QVariant::Bool) {
+#else
+            if (attribute.typeId() == QMetaType::Type::Bool) {
+#endif
                 if (attribute.toBool()) {
                     NSString *osxMode =
                         [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"];
                     mode = [osxMode isEqualToString:@"Dark"] ? NSWindowProxy::BlurMode::Dark
                                                              : NSWindowProxy::BlurMode::Light;
                 }
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
             } else if (attribute.type() == QVariant::String) {
+#else
+            } else if (attribute.typeId() == QMetaType::Type::QString) {
+#endif
                 auto value = attribute.toString();
                 if (value == QStringLiteral("dark")) {
                     mode = NSWindowProxy::BlurMode::Dark;

--
Gitblit v1.9.1