From 79d98630fe80c08de82ffd041c85aa589f08013f Mon Sep 17 00:00:00 2001
From: Zhao Yuhang <2546789017@qq.com>
Date: 周六, 06 1月 2024 13:21:09 +0800
Subject: [PATCH] improve qml implementation

---
 src/core/contexts/win32windowcontext.cpp |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp
index 64050b5..3f6623e 100644
--- a/src/core/contexts/win32windowcontext.cpp
+++ b/src/core/contexts/win32windowcontext.cpp
@@ -1,3 +1,7 @@
+// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
+// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
+// SPDX-License-Identifier: Apache-2.0
+
 #include "win32windowcontext_p.h"
 
 #include <optional>
@@ -680,7 +684,7 @@
     }
 
     QVariant Win32WindowContext::windowAttribute(const QString &key) const {
-        if (key == QStringLiteral("title-bar-rect")) {
+        if (key == QStringLiteral("window-rect")) {
             if (!m_windowHandle)
                 return {};
 
@@ -731,13 +735,13 @@
             static auto margins = QVariant::fromValue(QMargins(1, 1, 1, 1));
 
             // If we remove the system border, the window will lose its shadow. If dwm is enabled,
-            // then you need to set at least 1px margins, otherwise the following operation will
+            // then we need to set at least 1px margins, otherwise the following operation will
             // fail with no effect.
             setWindowAttribute(QStringLiteral("extra-margins"), margins);
         }
 
         // We should disable WS_SYSMENU, otherwise the system button icons will be visible if mica
-        // is enabled and the title bar is transparent
+        // is enabled and the title bar is transparent.
         {
             auto style = ::GetWindowLongPtrW(hWnd, GWL_STYLE);
             if (isSystemBorderEnabled()) {

--
Gitblit v1.9.1