| | |
| | | ## 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) |
| | | |
| | |
| | | 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()) { |
| | |
| | | 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, |
| | |
| | | } |
| | | |
| | | /*! |
| | | 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 |
| | |
| | | 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); |