From 63354f2d8d3ec979efd517555d615a2b8500a7dc Mon Sep 17 00:00:00 2001 From: Mentalflow <312902918@qq.com> Date: Sun, 14 May 2023 22:58:31 +0800 Subject: [PATCH] Improve FluAcrylic. --- src/imports/FluentUI/Controls/FluAcrylic.qml | 40 +++++++++++--------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/imports/FluentUI/Controls/FluAcrylic.qml b/src/imports/FluentUI/Controls/FluAcrylic.qml index 6c61b32..1087ecd 100644 --- a/src/imports/FluentUI/Controls/FluAcrylic.qml +++ b/src/imports/FluentUI/Controls/FluAcrylic.qml @@ -7,26 +7,32 @@ Item { property alias color: rect.color property alias acrylicOpacity: rect.opacity - property int radius: 50 + property alias radius:bg.radius + property alias blurRadius: blur.radius property var sourceItem: control.parent - - Rectangle { - id: rect + FluRectangle{ + id:bg anchors.fill: parent - color: "white" - opacity: 0.1 - } + radius: [8,8,8,8] - ShaderEffectSource { - id: effect_source - anchors.fill: parent - sourceItem: control.sourceItem - sourceRect: Qt.rect(control.x, control.y, control.width, control.height) - } + ShaderEffectSource { + id: effect_source + anchors.fill: parent + sourceItem: control.sourceItem + sourceRect: Qt.rect(control.x, control.y, control.width, control.height) + Rectangle { + id: rect + anchors.fill: parent + color: "white" + opacity: 0.5 + } + } - FastBlur { - radius: control.radius - anchors.fill: effect_source - source: effect_source + FastBlur { + id:blur + radius: 50 + anchors.fill: effect_source + source: effect_source + } } }