mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-05 01:25:25 +08:00
update
This commit is contained in:
@ -1,37 +1,3 @@
|
||||
//#include "FluTheme.h"
|
||||
|
||||
//#include "Def.h"
|
||||
//#include "FluColors.h"
|
||||
//#include <QPalette>
|
||||
//#include <QtGui/qpa/qplatformtheme.h>
|
||||
//#include <QtGui/private/qguiapplication_p.h>
|
||||
//#include <QGuiApplication>
|
||||
//#include <FramelessHelper/Core/utils.h>
|
||||
//#include <FramelessHelper/Core/framelessmanager.h>
|
||||
|
||||
//FRAMELESSHELPER_USE_NAMESPACE;
|
||||
|
||||
//FluTheme* FluTheme::m_instance = nullptr;
|
||||
|
||||
//FluTheme *FluTheme::getInstance()
|
||||
//{
|
||||
// if(FluTheme::m_instance == nullptr){
|
||||
// FluTheme::m_instance = new FluTheme;
|
||||
// }
|
||||
// return FluTheme::m_instance;
|
||||
//}
|
||||
|
||||
//FluTheme::FluTheme(QObject *parent)
|
||||
// : QObject{parent}
|
||||
//{
|
||||
// primaryColor(FluColors::getInstance()->Blue());
|
||||
// nativeText(false);
|
||||
// dark(FramelessManager::instance()->systemTheme() == Global::SystemTheme::Dark);
|
||||
// connect(FramelessManager::instance(), &FramelessManager::systemThemeChanged, this, [this](){
|
||||
// dark(Utils::getSystemTheme()==Global::SystemTheme::Dark);
|
||||
// });
|
||||
//}
|
||||
|
||||
#include "FluTheme.h"
|
||||
|
||||
#include "Def.h"
|
||||
@ -40,11 +6,6 @@
|
||||
#include <QtGui/qpa/qplatformtheme.h>
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
#include <QGuiApplication>
|
||||
#include <FramelessHelper/Core/utils.h>
|
||||
#include <FramelessHelper/Core/framelessmanager.h>
|
||||
|
||||
FRAMELESSHELPER_USE_NAMESPACE;
|
||||
|
||||
|
||||
FluTheme* FluTheme::m_instance = nullptr;
|
||||
|
||||
@ -82,10 +43,12 @@ bool FluTheme::eventFilter(QObject *obj, QEvent *event)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool FluTheme::systemDark()
|
||||
{
|
||||
return Utils::getSystemTheme()==Global::SystemTheme::Dark;
|
||||
if (const QPlatformTheme * const theme = QGuiApplicationPrivate::platformTheme()) {
|
||||
return (theme->appearance() == QPlatformTheme::Appearance::Dark);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FluTheme::dark(){
|
||||
|
Reference in New Issue
Block a user