This commit is contained in:
朱子楚\zhuzi 2024-05-05 21:33:47 +08:00
parent ac253a3de5
commit 394a42cb94
2 changed files with 11 additions and 1 deletions

View File

@ -180,7 +180,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
Qt${QT_VERSION_MAJOR}::Qml
)
if (${QT_VERSION_MAJOR} LESS_EQUAL 6)
if ((${QT_VERSION_MAJOR} LESS_EQUAL 6) AND (CMAKE_BUILD_TYPE MATCHES "Release"))
find_program(QML_PLUGIN_DUMP NAMES qmlplugindump)
add_custom_target(Script-Generate-QmlTypes
COMMAND ${QML_PLUGIN_DUMP} -nonrelocatable FluentUI 1.0 ${CMAKE_CURRENT_BINARY_DIR} > ${CMAKE_CURRENT_SOURCE_DIR}/Qt5/imports/FluentUI/plugins.qmltypes

View File

@ -259,17 +259,27 @@ void FluFrameless::componentComplete() {
*result = HTCLIENT;
return true;
} else if (uMsg == WM_NCPAINT) {
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0))
*result = FALSE;
return true;
#else
if (isCompositionEnabled()) {
return false;
}
*result = FALSE;
return true;
#endif
} else if (uMsg == WM_NCACTIVATE) {
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0))
*result = TRUE;
return true;
#else
if (isCompositionEnabled()) {
return false;
}
*result = TRUE;
return true;
#endif
} else if (uMsg == WM_GETMINMAXINFO) {
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3) || QT_VERSION == QT_VERSION_CHECK(6, 6, 0))
auto *minmaxInfo = reinterpret_cast<MINMAXINFO *>(lParam);