This commit is contained in:
zhuzihcu
2023-05-17 12:49:41 +08:00
parent 09dd381bbc
commit b93f91a73f
8 changed files with 63 additions and 18 deletions

View File

@ -1,5 +1,21 @@
#include "FluentUI.h"
#include <FramelessHelper/Quick/framelessquickmodule.h>
#include <FramelessHelper/Core/private/framelessconfig_p.h>
void FluentUI::init(){
FRAMELESSHELPER_USE_NAMESPACE;
void FluentUI::preInit(){
qDebug()<<"FluentUI init";
FramelessHelper::Quick::initialize();
qputenv("QT_QUICK_CONTROLS_STYLE","Basic");
//6.4及以下监听系统深色模式变化
#ifdef Q_OS_WIN
qputenv("QT_QPA_PLATFORM","windows:darkmode=2");
#endif
}
void FluentUI::postInit(){
FramelessHelper::Core::setApplicationOSThemeAware();
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow);
FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial);
}