From 22de749c7448eb401ec9a44c877162943d97f05b Mon Sep 17 00:00:00 2001 From: zhuzihcu Date: Tue, 23 May 2023 09:33:37 +0800 Subject: [PATCH] update --- example/qml/component/CustomWindow.qml | 2 +- example/src/main.cpp | 5 +++-- src/imports/FluentUI/Controls/FluWindow.qml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/example/qml/component/CustomWindow.qml b/example/qml/component/CustomWindow.qml index 7a49a930..614aa537 100644 --- a/example/qml/component/CustomWindow.qml +++ b/example/qml/component/CustomWindow.qml @@ -46,7 +46,7 @@ FluWindow { framless_helper.setWindowFixedSize(fixSize) title_bar.maximizeButton.visible = !fixSize if (blurBehindWindowEnabled) - window.backgroundOpacity = 0.1 + window.backgroundVisible = false window.visible = true } } diff --git a/example/src/main.cpp b/example/src/main.cpp index 3032bccb..d923b320 100644 --- a/example/src/main.cpp +++ b/example/src/main.cpp @@ -24,9 +24,10 @@ FRAMELESSHELPER_USE_NAMESPACE FramelessConfig::instance()->set(Global::Option::ForceHideWindowFrameBorder); FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial); FramelessConfig::instance()->set(Global::Option::CenterWindowBeforeShow); - FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow,false); + FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur); + FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow); #ifdef Q_OS_MACOS - FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow,true); + FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur,false); #endif AppInfo* appInfo = new AppInfo(); IPC ipc(0); diff --git a/src/imports/FluentUI/Controls/FluWindow.qml b/src/imports/FluentUI/Controls/FluWindow.qml index f525844c..5a4edacc 100644 --- a/src/imports/FluentUI/Controls/FluWindow.qml +++ b/src/imports/FluentUI/Controls/FluWindow.qml @@ -31,6 +31,7 @@ Window { return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1) } property alias backgroundOpacity: bg.opacity + property alias backgroundVisible: bg.visible signal initArgument(var argument) id:window color:"transparent"