Skip to content

Commit a0ba7c8

Browse files
committed
fix: adjust blur behavior in floating panel and menu
1. Added enableBlur property alias to control blur effect validity 2. Modified Loader activation condition to check both window transparency and blur validity 3. Temporarily disabled blur in Menu component due to bug 300055 4. Changed InWindowBlur's valid property from readonly to writable for better control 5. These changes provide more granular control over blur effects and fix visual issues fix: 调整浮动面板和菜单的模糊效果行为 1. 添加enableBlur属性别名以控制模糊效果有效性 2. 修改Loader激活条件以同时检查窗口透明度和模糊有效性 3. 由于BUG 300055暂时禁用菜单组件中的模糊效果 4. 将InWindowBlur的valid属性从只读改为可写以便更好控制 5. 这些变更提供了对模糊效果更精细的控制并修复了视觉问题 pms: BUG-300055
1 parent 788262d commit a0ba7c8

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

qt6/src/qml/FloatingPanel.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Control {
2222
property int blurRadius: 64
2323
// blur blurMultiplier
2424
property real blurMultiplier: 0.0
25+
property alias enableBlur: blur.valid
2526

2627
background: D.InWindowBlur {
2728
id: blur
@@ -41,7 +42,7 @@ Control {
4142

4243
Loader {
4344
anchors.fill: parent
44-
active: Window.window && Window.window.color.a < 1
45+
active: Window.window && Window.window.color.a < 1 && blur.valid
4546
sourceComponent: D.ItemViewport {
4647
anchors.fill: parent
4748
fixed: true

qt6/src/qml/Menu.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ T.Menu {
109109
backgroundColor: control.backgroundColor
110110
backgroundNoBlurColor: control.backgroundNoBlurColor
111111
outsideBorderColor: null
112+
enableBlur: false // TODO disable blur temporarily, pms:BUG 300055
112113
}
113114
}
114115

qt6/src/qml/overridable/InWindowBlur.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Item {
1313
property alias multiplier: blur.blurMultiplier
1414
property alias content: blur
1515
default property alias data: blitter.data
16-
readonly property bool valid: blitter.blitterEnabled
16+
property alias valid: blitter.blitterEnabled
1717

1818
D.BackdropBlitter {
1919
id: blitter

0 commit comments

Comments
 (0)