2023-05-17 11:42:03 +08:00
|
|
|
|
#include "FluentUI.h"
|
2023-05-17 12:49:41 +08:00
|
|
|
|
#include <FramelessHelper/Quick/framelessquickmodule.h>
|
|
|
|
|
#include <FramelessHelper/Core/private/framelessconfig_p.h>
|
2023-05-17 11:42:03 +08:00
|
|
|
|
|
2023-05-17 12:49:41 +08:00
|
|
|
|
FRAMELESSHELPER_USE_NAMESPACE;
|
|
|
|
|
|
|
|
|
|
void FluentUI::preInit(){
|
2023-05-17 11:42:03 +08:00
|
|
|
|
qDebug()<<"FluentUI init";
|
2023-05-17 12:49:41 +08:00
|
|
|
|
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);
|
2023-05-17 11:42:03 +08:00
|
|
|
|
}
|