Skip to content

Commit 45399c4

Browse files
committed
feat: add ComboBox blur preference
1. Add a DTK configuration binding in ComboBox.qml using org.deepin.dtk.preference 2. Introduce the enableComboBoxBlur boolean preference with a default value of true 3. Bind the popup menu's enableBlur property to the new configuration so the ComboBox dropdown blur effect can be turned on or off dynamically 4. This change makes the dropdown visual effect configurable, allowing environments or users with different performance or visual preference requirements to control blur behavior without modifying component logic Log: Added a configurable blur effect option for ComboBox dropdowns Influence: 1. Verify that ComboBox dropdowns still display blur by default when no custom preference is set 2. Disable enableComboBoxBlur in org.deepin.dtk.preference and confirm the dropdown background renders without blur 3. Re-enable the preference and confirm the blur effect is restored immediately or after expected configuration reload timing 4. Test multiple ComboBox instances to ensure the configuration is applied consistently across all dropdown menus 5. Verify no regression in dropdown rendering, sizing, radius, background color, and open/close interaction 6. Check behavior on low-performance or blur-unsupported environments to confirm the dropdown degrades gracefully feat: 新增 ComboBox 模糊效果配置 1. 在 ComboBox.qml 中新增 DTK 配置绑定,使用 org.deepin.dtk.preference 配置项 2. 引入 enableComboBoxBlur 布尔配置项,默认值为 true 3. 将下拉弹出菜单的 enableBlur 属性绑定到该配置,使 ComboBox 下拉框模糊 效果可以动态开启或关闭 4. 该变更将下拉视觉效果改为可配置项,便于在不同性能环境或不同用户视觉偏 好下控制模糊行为,而无需修改组件本身逻辑 Log: 为 ComboBox 下拉框新增可配置的模糊效果选项 Influence: 1. 验证在未设置自定义偏好时,ComboBox 下拉框默认仍会显示模糊效果 2. 在 org.deepin.dtk.preference 中关闭 enableComboBoxBlur,确认下拉框背 景渲染为无模糊效果 3. 重新开启该配置,确认模糊效果可立即恢复或按预期的配置刷新时机恢复 4. 测试多个 ComboBox 实例,确保所有下拉菜单都能一致应用该配置 5. 验证下拉框渲染、尺寸、圆角、背景色以及展开/收起交互没有回归 6. 检查在低性能环境或不支持模糊的环境下的表现,确认下拉框能够平滑降级 PMS: BUG-358837 Change-Id: Ifd7255009fa87539481ebb515f93f89ac5958ce5
1 parent df9e39f commit 45399c4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

qt6/src/qml/ComboBox.qml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ T.ComboBox {
2222
property bool isInteractingWithContent: false
2323
opacity: enabled ? 1.0 : 0.4
2424

25+
D.Config {
26+
id: dtkConfig
27+
name: "org.deepin.dtk.preference"
28+
subpath: ""
29+
property bool enableComboBoxBlur: true
30+
}
31+
2532
implicitWidth: DS.Style.control.implicitWidth(control)
2633
implicitHeight: DS.Style.control.implicitHeight(control)
2734
baselineOffset: contentItem.y + contentItem.baselineOffset
@@ -195,6 +202,7 @@ T.ComboBox {
195202
implicitHeight: DS.Style.menu.item.height
196203
radius: DS.Style.menu.radius
197204
backgroundColor: DS.Style.menu.background
205+
enableBlur: dtkConfig.enableComboBoxBlur
198206
}
199207
}
200208
}

0 commit comments

Comments
 (0)