From 0a4c6076fe4202dc72d2b5bfbf0a41fa94671775 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: ćšć, 23 5æ 2024 18:57:01 +0800 Subject: [PATCH] Update --- qmsetup | 2 +- src/CMakeLists.txt | 36 +++++++----------------------------- src/core/windowagentbase.cpp | 4 ++++ src/core/contexts/win32windowcontext.cpp | 6 ++++++ 4 files changed, 18 insertions(+), 30 deletions(-) diff --git a/qmsetup b/qmsetup index 164e6e4..5397c13 160000 --- a/qmsetup +++ b/qmsetup @@ -1 +1 @@ -Subproject commit 164e6e4ec87bcde7a2a4265e1b57bd016051c6a7 +Subproject commit 5397c13aa8f2c489d865648f09df3c87351c3d83 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 760c5c5..6279fb5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -179,36 +179,14 @@ # Install # ---------------------------------- if(QWINDOWKIT_INSTALL) - # Add install target - set(_install_dir ${CMAKE_INSTALL_LIBDIR}/cmake/${QWINDOWKIT_INSTALL_NAME}) - - # Add version file - write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/${QWINDOWKIT_INSTALL_NAME}ConfigVersion.cmake" - VERSION ${PROJECT_VERSION} - COMPATIBILITY AnyNewerVersion - ) - - # Add configuration file - configure_package_config_file( - ${CMAKE_CURRENT_LIST_DIR}/${QWINDOWKIT_INSTALL_NAME}Config.cmake.in - "${CMAKE_CURRENT_BINARY_DIR}/${QWINDOWKIT_INSTALL_NAME}Config.cmake" - INSTALL_DESTINATION ${_install_dir} - NO_CHECK_REQUIRED_COMPONENTS_MACRO - ) - - # Install cmake files - install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/${QWINDOWKIT_INSTALL_NAME}Config.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/${QWINDOWKIT_INSTALL_NAME}ConfigVersion.cmake" - DESTINATION ${_install_dir} - ) - - # Install cmake targets files - install(EXPORT ${QWINDOWKIT_INSTALL_NAME}Targets - FILE "${QWINDOWKIT_INSTALL_NAME}Targets.cmake" + qm_basic_install( + NAME ${QWINDOWKIT_INSTALL_NAME} + VERSION ${QWINDOWKIT_VERSION} + INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${QWINDOWKIT_INSTALL_NAME} + CONFIG_TEMPLATE "${QWINDOWKIT_INSTALL_NAME}Config.cmake.in" NAMESPACE ${QWINDOWKIT_INSTALL_NAME}:: - DESTINATION ${_install_dir} + EXPORT ${QWINDOWKIT_INSTALL_NAME}Targets + WRITE_CONFIG_OPTIONS NO_CHECK_REQUIRED_COMPONENTS_MACRO ) # Install shared files diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp index 43d5cb6..07b835f 100644 --- a/src/core/contexts/win32windowcontext.cpp +++ b/src/core/contexts/win32windowcontext.cpp @@ -831,6 +831,12 @@ ? int(getWindowFrameBorderThickness(reinterpret_cast<HWND>(m_windowId))) : 0; } + + if (key == QStringLiteral("title-bar-height")) { + return m_windowId + ? int(getTitleBarHeight(reinterpret_cast<HWND>(m_windowId))) + : 0; + } return AbstractWindowContext::windowAttribute(key); } diff --git a/src/core/windowagentbase.cpp b/src/core/windowagentbase.cpp index 69328d9..6b68cee 100644 --- a/src/core/windowagentbase.cpp +++ b/src/core/windowagentbase.cpp @@ -99,6 +99,10 @@ \li \c extra-margins: Specify a margin value to change the \c dwm extended area geometry, you shouldn't change this attribute because it may break the internal state. + \li \c border-thickness: Returns the system border thickness. (Readonly) + \li \c title-bar-height: Returns the system title bar height, some system features may + be related to this property so that it is recommended to set the custom title bar + height to this value. (Readonly) On macOS, \li \c no-system-buttons: Specify a boolean value to set the system buttons' -- Gitblit v1.9.1