Skip to content

Conversation

@18202781743
Copy link
Contributor

@18202781743 18202781743 commented Aug 11, 2025

Updated the color palette values in FlowStyle.qml to improve visual
consistency and dark mode support. Changes include:

  1. Modified background1 colors to use rgba values for better
    transparency control
  2. Added missing hoveredDark and pressedDark states for dark mode
  3. Adjusted crystal theme colors to match dark/light mode requirements
  4. Unified color handling between common and crystal themes
  5. Improved highlight color states for better visual feedback

Log: Improved UI color consistency across themes and states

Influence:

  1. Verify all UI elements render correctly in both light and dark modes
  2. Check hover and pressed states for interactive elements
  3. Test color transitions between different states
  4. Validate accessibility and contrast ratios
  5. Ensure consistency across different display configurations

style: 调整UI调色板数值

更新了FlowStyle.qml中的调色板数值以提高视觉一致性和暗黑模式支持。修改
包括:

  1. 修改background1颜色使用rgba值以获得更好的透明度控制
  2. 为暗黑模式添加缺失的hoveredDark和pressedDark状态
  3. 调整crystal主题颜色以匹配暗黑/明亮模式需求
  4. 统一common和crystal主题的颜色处理
  5. 改进高亮颜色状态以获得更好的视觉反馈

Log: 改进了跨主题和状态的UI颜色一致性

Influence:

  1. 验证所有UI元素在明亮和暗黑模式下都能正确渲染
  2. 检查交互元素的悬停和按下状态
  3. 测试不同状态之间的颜色过渡
  4. 验证可访问性和对比度比率
  5. 确保在不同显示配置下的一致性

PMS: BUG-327451

Summary by Sourcery

Revise FlowStyle.qml color palette to improve visual consistency and dark mode support by refining RGBA transparency, adding missing dark states, and unifying theme color definitions

New Features:

  • Added hoveredDark and pressedDark color states for dark mode

Enhancements:

  • Converted background1 and highlight theme colors to use RGBA for precise transparency control
  • Adjusted crystal theme colors and unified color handling between common and crystal themes
  • Tweaked highlight color saturation and lightness for improved visual feedback

@18202781743 18202781743 requested review from BLumia and mhduiy August 11, 2025 07:21
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Aug 11, 2025
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#511
@sourcery-ai
Copy link

sourcery-ai bot commented Aug 11, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR overhauls the FlowStyle.qml color palette by migrating hardcoded hex values to Qt.rgba for precise transparency, adding missing dark-mode states, aligning crystal theme colors with light/dark requirements, unifying common and crystal definitions, and refining highlight states for better visual feedback.

File-Level Changes

Change Details Files
Refactored background1 palette entries for RGBA transparency and dark mode states
  • Converted background1 normal and crystal colors to Qt.rgba for transparency control
  • Updated normalDark opacity values
  • Replaced hovered and pressed hex values with Qt.rgba for both themes
  • Added hoveredDark and pressedDark states
qt6/src/qml/FlowStyle.qml
Enhanced highlight color states with refined saturation, lightness, and RGBA support
  • Adjusted normalDark, hovered, hoveredDark, and pressedDark entries using D.DTK color functions and Qt.rgba
  • Unified alpha values for crystal theme highlight states to improve contrast
qt6/src/qml/FlowStyle.qml
Unified color definitions across common and crystal themes
  • Removed hardcoded hex strings in favor of shared Qt.rgba expressions
  • Ensured consistent alpha and color values between themes
qt6/src/qml/FlowStyle.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @18202781743 - I've reviewed your changes - here's some feedback:

  • Consider abstracting repeated Qt.rgba color definitions into named constants to reduce duplication and improve maintainability.
  • Verify that the adjusted alpha values still meet the required contrast ratios for accessibility in both light and dark modes.
  • Ensure the new hoveredDark and pressedDark states are consistently applied across all interactive QML components to avoid missing styling in dark mode.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider abstracting repeated Qt.rgba color definitions into named constants to reduce duplication and improve maintainability.
- Verify that the adjusted alpha values still meet the required contrast ratios for accessibility in both light and dark modes.
- Ensure the new hoveredDark and pressedDark states are consistently applied across all interactive QML components to avoid missing styling in dark mode.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Updated the color palette values in FlowStyle.qml to improve visual
consistency and dark mode support. Changes include:
1. Modified background1 colors to use rgba values for better
transparency control
2. Added missing hoveredDark and pressedDark states for dark mode
3. Adjusted crystal theme colors to match dark/light mode requirements
4. Unified color handling between common and crystal themes
5. Improved highlight color states for better visual feedback

Log: Improved UI color consistency across themes and states

Influence:
1. Verify all UI elements render correctly in both light and dark modes
2. Check hover and pressed states for interactive elements
3. Test color transitions between different states
4. Validate accessibility and contrast ratios
5. Ensure consistency across different display configurations

style: 调整UI调色板数值

更新了FlowStyle.qml中的调色板数值以提高视觉一致性和暗黑模式支持。修改
包括:
1. 修改background1颜色使用rgba值以获得更好的透明度控制
2. 为暗黑模式添加缺失的hoveredDark和pressedDark状态
3. 调整crystal主题颜色以匹配暗黑/明亮模式需求
4. 统一common和crystal主题的颜色处理
5. 改进高亮颜色状态以获得更好的视觉反馈

Log: 改进了跨主题和状态的UI颜色一致性

Influence:
1. 验证所有UI元素在明亮和暗黑模式下都能正确渲染
2. 检查交互元素的悬停和按下状态
3. 测试不同状态之间的颜色过渡
4. 验证可访问性和对比度比率
5. 确保在不同显示配置下的一致性

PMS: BUG-327451
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Aug 11, 2025
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#511
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

代码审查意见:

  1. 颜色值重复定义

    • normalDarkhoveredDark状态中,crystal的颜色值被重复定义。建议检查是否有必要,并考虑合并相同的颜色值以减少代码冗余。
  2. 透明度值变化

    • normalDarkhovered状态中,crystal的透明度值从0.1变更为0.08,而在pressedDark状态中,透明度值从0.1变更为0.05。这种变化可能是有意为之,但应确保这种变化符合设计要求,并且与UI的一致性。
  3. 颜色值计算

    • normalDarkhovered状态中,crystal的颜色值是通过D.DTK.makeColor方法计算得到的。这种计算方式可能不够直观,建议提供注释说明计算逻辑,或者考虑使用更直观的颜色定义方式。
  4. 状态定义顺序

    • pressedpressedDark状态中,crystal的颜色值被定义在pressed状态之后。这种定义顺序可能导致在pressed状态中无法正确引用pressedDark状态的颜色值。建议调整状态定义的顺序,确保引用的正确性。
  5. 代码格式

    • hoveredpressed状态中,crystal的颜色值定义后多了一个逗号,建议检查并删除多余的逗号,以保持代码的一致性和可读性。
  6. 注释和文档

    • 考虑为normalDarkhoveredDarkpressedDark等状态添加注释,说明这些状态的颜色值变化的原因和用途,以便其他开发者更好地理解代码。

综上所述,代码在颜色值定义、透明度变化、颜色值计算、状态定义顺序和代码格式等方面存在一些潜在的问题,建议进行相应的调整和优化。

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, BLumia

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Aug 14, 2025

TAG Bot

New tag: 5.7.21
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #517

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Sep 4, 2025

TAG Bot

New tag: 5.7.22
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants