Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 52cyb The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideReplaces obsolete palette.windowText bindings with state-aware text-color properties so selected settings items and highlighted timezone entries retain the correct foreground color after dtkdeclarative changes. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/plugin-datetime/qml/TimeAndDate.qml" line_range="443" />
<code_context>
text: parent.parent.text
font: D.DTK.fontManager.t6
- color: parent.parent.palette.windowText
+ color: parent.parent.D.ColorSelector.textColor
elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft
</code_context>
<issue_to_address>
**issue (broader_impact):** The second timezone menu delegate in `TimeAndDate.qml` still binds its text to `parent.parent.palette.windowText` (around line 522), so that list's highlighted item continues to use the inherited default foreground instead of the state-dependent highlighted text color.
**Triggers:** When the timezone list opened by `timezoneListWindow` contains a highlighted item in the light theme.
**Suggested fix:** Replace the remaining `palette.windowText` binding in the second timezone delegate with the corresponding `D.ColorSelector.textColor` binding.
</issue_to_address>…ext writes 1. TimeAndDate: read the timezone menu item text color from `D.ColorSelector.textColor` instead of the removed `palette.windowText`, restoring white text on the highlighted item 2. DccEditorItem: read the item text color from `resolvedTextColor` instead of `palette.windowText` Log: Adapt dde-control-center to dtkdeclarative removing palette.windowText writes (windowText now returns the inherited default foreground instead of the state-dependent text color) Influence: 1. Timezone dropdown highlighted item text stays white in light theme 2. Settings editor list item selected text color is correct fix(datetime): 适配时区列表与设置列表项到已移除的 windowText 写入 1. TimeAndDate:时区菜单项文字色改由 `D.ColorSelector.textColor` 获取,替代已 移除的 `palette.windowText`,恢复高亮项白色文字 2. DccEditorItem:列表项文字色改由 `resolvedTextColor` 获取,替代 `palette.windowText` Log: 适配 dtkdeclarative 移除 palette.windowText 写入(windowText 现返回继承 默认前景色而非随状态变化的文字色) Influence: 1. 浅色主题下时区下拉高亮项文字保持白色 2. 设置页列表项选中文字色正确 PMS: TASK-392413
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无需修改,QML 属性绑定语法正确,逻辑清晰 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无需修改,代码变更简洁、PR描述详尽 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无需优化,属性绑定变更无性能影响 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 无需安全加固,本次变更不涉及安全相关操作 💡 改进建议代码示例// 本次变更已为最佳实现,无需额外修复
// DccEditorItem.qml:
// color: control.resolvedTextColor // 正确:使用状态相关文字色
//
// TimeAndDate.qml:
// color: parent.parent.D.ColorSelector.textColor // 正确:使用 DTK 颜色选择器文字色本报告由 AI 代码审查工具自动生成 |
|
TAG Bot New tag: 6.1.106 |
|
TAG Bot New tag: 6.1.107 |
|
TAG Bot New tag: 6.1.109 |
…ext writes
D.ColorSelector.textColorinstead of the removedpalette.windowText, restoring white text on the highlighted itemresolvedTextColorinstead ofpalette.windowTextLog: Adapt dde-control-center to dtkdeclarative removing palette.windowText writes (windowText now returns the inherited default foreground instead of the state-dependent text color)
Influence:
fix(datetime): 适配时区列表与设置列表项到已移除的 windowText 写入
D.ColorSelector.textColor获取,替代已 移除的palette.windowText,恢复高亮项白色文字resolvedTextColor获取,替代palette.windowTextLog: 适配 dtkdeclarative 移除 palette.windowText 写入(windowText 现返回继承 默认前景色而非随状态变化的文字色)
Influence:
PMS: TASK-392413
Summary by Sourcery
Bug Fixes: