diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 40bde6da..985bce38 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -42,7 +42,7 @@ jobs: version: ${{ matrix.qt_ver }} arch: ${{ matrix.qt_arch }} cache: ${{steps.cache-qt.outputs.cache-hit}} - modules: 'qt5compat qtmultimedia qtshadertools qtimageformats' + modules: 'qt5compat qtmultimedia qtshadertools qtimageformats qtspeech' - name: msvc-build id: build diff --git a/src/FluTheme.cpp b/src/FluTheme.cpp index 5ba8418e..4372d971 100644 --- a/src/FluTheme.cpp +++ b/src/FluTheme.cpp @@ -2,8 +2,14 @@ #include "Def.h" #include "FluColors.h" -#include +#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)) #include +#elif ((QT_VERSION >= QT_VERSION_CHECK(6, 2, 1))) +#include +#include +#include +#endif + #include FluTheme* FluTheme::m_instance = nullptr; @@ -44,7 +50,15 @@ bool FluTheme::eventFilter(QObject *obj, QEvent *event) bool FluTheme::systemDark() { - return QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark; +#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)) + return (QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark); +#elif ((QT_VERSION >= QT_VERSION_CHECK(6, 2, 1))) + if (const QPlatformTheme * const theme = QGuiApplicationPrivate::platformTheme()) { + return (theme->appearance() == QPlatformTheme::Appearance::Dark); + } + return false; +#endif + return false; } bool FluTheme::dark(){