Sine Striker
2023-12-28 0339e9e5e19fd4fe65113e1a819826109b7e4727
minor tweaks
4个文件已修改
18 ■■■■■ 已修改文件
README.md 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/win32windowcontext.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/win32windowcontext_p.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/windowagentbase.cpp 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
README.md
@@ -254,13 +254,11 @@
## TODO
+ Fix 5.15 window abnormal behavior
+ Support Mac system buttons customization for Quick
+ More documentations
+ When do we support Linux native features?
## Special Thanks
+ [Arabaku](https://github.com/Arabaku)
+ [Maplespe](https://github.com/Maplespe)
+ [zhiyiYo](https://github.com/zhiyiYo)
src/core/contexts/win32windowcontext.cpp
@@ -731,13 +731,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()) {
src/core/contexts/win32windowcontext_p.h
@@ -47,7 +47,7 @@
                               LRESULT *result);
        // In order to perfectly apply Windows 11 Snap Layout into the Qt window, we need to
        // intercept and simulate most of the  mouse events, so that the processing logic
        // intercept and emulate most of the  mouse events, so that the processing logic
        // is quite complex. Simultaneously, in order to make the handling code of other
        // Windows messages clearer, we have separated them into this function.
        bool snapLayoutHandler(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam,
src/core/windowagentbase.cpp
@@ -78,9 +78,7 @@
    }
    /*!
        Sets the platform-related attribute for the window.
        Available attributes:
        Sets the platform-related attribute for the window. Available attributes:
        On Windows,
            \li \c dwm-blur: Specify a boolean value to enable or disable dwm blur effect, this
@@ -101,9 +99,9 @@
        On macOS,
            \li \c no-system-buttons: Specify a boolean value to set the system buttons'
                   visibility.
            \li \c blur-effect: You can specify a string value, "dark" to set dark mode, "light"
                   to set light mode, "none" to disable. You can also specify a boolean value,
                   \c true to enable and set the current theme, \c false to disable.
            \li \c blur-effect: You can specify a string value, "dark" to enable dark mode, "light"
                   to set enable mode, "none" to disable. You can also specify a boolean value,
                   \c true to enable current theme mode, \c false to disable.
    */
    bool WindowAgentBase::setWindowAttribute(const QString &key, const QVariant &attribute) {
        Q_D(WindowAgentBase);