Skip to content

Commit

Permalink
Use QModernWindowsStylePlugin for Qt >= 6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Jan 19, 2025
1 parent c327cf1 commit f275a20
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
26 changes: 22 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2899,8 +2899,16 @@ if(Qt_IS_STATIC)
if(WIN32)
target_link_libraries(mixxx-lib PRIVATE
Qt${QT_VERSION_MAJOR}::QWindowsIntegrationPlugin
Qt${QT_VERSION_MAJOR}::QWindowsVistaStylePlugin
)
if(QT_VERSION VERSION_LESS 6.7)
target_link_libraries(mixxx-lib PRIVATE
Qt${QT_VERSION_MAJOR}::QWindowsVistaStylePlugin
)
else()
target_link_libraries(mixxx-lib PRIVATE
Qt${QT_VERSION_MAJOR}::QModernWindowsStylePlugin
)
endif()
endif()

if(APPLE)
Expand Down Expand Up @@ -3047,9 +3055,19 @@ else()
install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QWindowsIntegrationPlugin
DESTINATION "${MIXXX_INSTALL_DATADIR}/platforms"
COMPONENT applocal)
install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QWindowsVistaStylePlugin
DESTINATION "${MIXXX_INSTALL_DATADIR}/styles"
COMPONENT applocal)
if(QT_VERSION VERSION_LESS 6.7)
target_link_libraries(mixxx-lib PRIVATE
install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QWindowsVistaStylePlugin
DESTINATION "${MIXXX_INSTALL_DATADIR}/styles"
COMPONENT applocal)
)
else()
target_link_libraries(mixxx-lib PRIVATE
install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QModernWindowsStylePlugin
DESTINATION "${MIXXX_INSTALL_DATADIR}/styles"
COMPONENT applocal)
)
endif()
endif()
if(APPLE)
install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin
Expand Down
4 changes: 4 additions & 0 deletions src/mixxxapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
Q_IMPORT_PLUGIN(QWasmIntegrationPlugin)
#elif defined(Q_OS_WIN)
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
Q_IMPORT_PLUGIN(QModernWindowsStylePlugin)
#else
Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin)
#endif
#elif defined(Q_OS_IOS)
Q_IMPORT_PLUGIN(QIOSIntegrationPlugin)
#elif defined(Q_OS_MACOS)
Expand Down

0 comments on commit f275a20

Please sign in to comment.