forked from linuxdeepin/dde-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInWindowBlur.qml
More file actions
44 lines (38 loc) · 1.29 KB
/
InWindowBlur.qml
File metadata and controls
44 lines (38 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick
import QtQuick.Effects
import org.deepin.dtk 1.0 as D
Item {
id :control
property bool offscreen: false
property alias radius: blur.radius
property alias content: content
default property alias data: blitter.data
readonly property bool valid: blitter.blitterEnabled
// Note: The original MultiEffect was replaced with FastBlur to improve
// performance and reduce memory consumption. The 'saturation' property
// was removed as part of this optimization.
D.BackdropBlitter {
id: blitter
anchors.fill: parent
blitterEnabled: !D.DTK.isSoftwareRender
Rectangle {
id: content
anchors.fill: parent
visible: blitter.blitterEnabled && !control.offscreen
property D.Palette overlay: D.Palette {
normal: ("#eeeeee")
normalDark: ("#333333")
}
color: Window.window && Window.window.color.a < 1 ? D.ColorSelector.overlay : "transparent"
FastBlur {
id: blur
anchors.fill: parent
source: blitter.content
radius: 64
}
}
}
}