fix(attributes): use palette text color - #217
Conversation
Use the current palette WindowText color for color property labels so they match adjacent DTK controls. Log: 修复工具属性文字颜色与圆角控件不一致的问题 Bug: https://pms.uniontech.com/bug-view-231619.html
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Resurgamz 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 GuideThis PR updates the drawing logic for color attribute labels in the right-side attributes panel so that their text color is taken from the current palette’s WindowText instead of hard-coded theme colors, ensuring consistency with DTK controls and automatic theme adaptation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 当前代码已是最优实现,无需修改。
// 保持以下代码即可:
// painter->setPen(palette().color(QPalette::WindowText)); |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
darkThemeflag is no longer used in these paint methods; consider removing it (and any related unused paths) to keep the drawing logic lean and avoid confusion.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `darkTheme` flag is no longer used in these paint methods; consider removing it (and any related unused paths) to keep the drawing logic lean and avoid confusion.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
问题\n修复右侧工具属性栏中颜色属性标签与圆角控件文字颜色不一致的问题。\n\n## 修复方案\n颜色属性标签绘制时使用当前调色板的
QPalette::WindowText,替代硬编码的深浅主题色值,使其与 DTK 控件保持一致并随主题自动适配。\n\n## 验证\n-cmake --build obj-x86_64-linux-gnu -j2\n\n## PMS\n- BUG-231619\n- 根因分析:analysis-report.mdSummary by Sourcery
Bug Fixes: