update
parent
b4f9f32195
commit
d55874f01e
|
@ -42,7 +42,7 @@ jobs:
|
||||||
version: ${{ matrix.qt_ver }}
|
version: ${{ matrix.qt_ver }}
|
||||||
arch: ${{ matrix.qt_arch }}
|
arch: ${{ matrix.qt_arch }}
|
||||||
cache: ${{steps.cache-qt.outputs.cache-hit}}
|
cache: ${{steps.cache-qt.outputs.cache-hit}}
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats'
|
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats qtspeech'
|
||||||
|
|
||||||
- name: msvc-build
|
- name: msvc-build
|
||||||
id: build
|
id: build
|
||||||
|
|
|
@ -2,8 +2,14 @@
|
||||||
|
|
||||||
#include "Def.h"
|
#include "Def.h"
|
||||||
#include "FluColors.h"
|
#include "FluColors.h"
|
||||||
#include <QPalette>
|
#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
|
||||||
#include <QStyleHints>
|
#include <QStyleHints>
|
||||||
|
#elif ((QT_VERSION >= QT_VERSION_CHECK(6, 2, 1)))
|
||||||
|
#include <QPalette>
|
||||||
|
#include <QtGui/qpa/qplatformtheme.h>
|
||||||
|
#include <QtGui/private/qguiapplication_p.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
|
|
||||||
FluTheme* FluTheme::m_instance = nullptr;
|
FluTheme* FluTheme::m_instance = nullptr;
|
||||||
|
@ -44,7 +50,15 @@ bool FluTheme::eventFilter(QObject *obj, QEvent *event)
|
||||||
|
|
||||||
bool FluTheme::systemDark()
|
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(){
|
bool FluTheme::dark(){
|
||||||
|
|
Loading…
Reference in New Issue