From 7d11b0e86467bcc3b652d3d0254d0399c7337faa Mon Sep 17 00:00:00 2001 From: Fatih Uzunoglu <fuzun54@outlook.com> Date: Tue, 26 Jul 2022 18:35:00 +0300 Subject: [PATCH] qml: use sourceItem opacity by default in FrostedGlassEffect --- modules/gui/qt/widgets/qml/FrostedGlassEffect.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/gui/qt/widgets/qml/FrostedGlassEffect.qml b/modules/gui/qt/widgets/qml/FrostedGlassEffect.qml index a8d0ba14e71e..ddf2e421d2c5 100644 --- a/modules/gui/qt/widgets/qml/FrostedGlassEffect.qml +++ b/modules/gui/qt/widgets/qml/FrostedGlassEffect.qml @@ -34,6 +34,8 @@ Rectangle { property real noiseStrength: 0.02 property real exclusionStrength: 0.09 + opacity: source.opacity + FastBlur { id: blurEffect @@ -64,6 +66,8 @@ Rectangle { uniform lowp sampler2D source; // this item varying highp vec2 qt_TexCoord0; + uniform lowp float qt_Opacity; + uniform lowp vec4 tint; uniform lowp float exclusionStrength; @@ -88,7 +92,7 @@ Rectangle { blurred = exclude(blurred, exclColor); - gl_FragColor = mix(blurred, tint, tintStrength) + noise; + gl_FragColor = (mix(blurred, tint, tintStrength) + noise) * qt_Opacity; }" } } -- GitLab