Skip to content

sync: from linuxdeepin/dtkdeclarative#283

Closed
deepin-ci-robot wants to merge 1 commit intomasterfrom
sync-pr-511-nosync
Closed

sync: from linuxdeepin/dtkdeclarative#283
deepin-ci-robot wants to merge 1 commit intomasterfrom
sync-pr-511-nosync

Conversation

@deepin-ci-robot
Copy link
Copy Markdown
Contributor

@deepin-ci-robot deepin-ci-robot commented Aug 11, 2025

Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#511

Summary by Sourcery

Update FlowStyle.qml to standardize color definitions and enhance theming consistency by using Qt.rgba, adjusting opacity values, and adding dark-mode variants for hovered and pressed states.

Enhancements:

  • Replace hardcoded hex and manual RGB values with consistent Qt.rgba color definitions in FlowStyle.qml
  • Adjust opacity levels for normal, hovered, and pressed states to refine visual appearance
  • Add missing dark-mode variants (hoveredDark and pressedDark) for background and highlight palettes

@deepin-ci-robot
Copy link
Copy Markdown
Contributor Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-ci-robot

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

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Aug 11, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR pulls in updates from linuxdeepin/dtkdeclarative by refactoring FlowStyle.qml’s overlay colors: it standardizes on Qt.rgba for all states, adds missing dark-mode variants, and tweaks alpha levels for greater consistency.

Class diagram for updated FlowStyle.qml Palette structure

classDiagram
    class FlowStyle {
        <<QtObject>>
        background1 : D.Palette
        highlight : D.Palette
    }
    class D.Palette {
        normal
        normalDark
        hovered
        hoveredDark
        pressed
        pressedDark
        disabled
    }
    FlowStyle --> D.Palette
    D.Palette : common
    D.Palette : crystal
    %% Highlighted changes:
    D.Palette : hoveredDark
    D.Palette : pressedDark
    %% hoveredDark and pressedDark added to both background1 and highlight
    %% All color values now use Qt.rgba
Loading

File-Level Changes

Change Details Files
Standardize background1 state overlays using Qt.rgba and add dark variants
  • Replaced hard-coded hex and computed values with Qt.rgba black overlays for normal, hovered, and pressed states
  • Introduced hoveredDark and pressedDark states with white Qt.rgba overlays
qt6/src/qml/FlowStyle.qml
Update Highlight state crystal overlays and dark-mode consistency
  • Lowered normalDark crystal alpha from 0.1 to 0.08
  • Replaced hovered crystal overlay with Qt.rgba black and added a white overlay in hoveredDark
  • Set pressedDark crystal to Qt.rgba white with alpha 0.05
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
Copy Markdown

@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 @deepin-ci-robot - I've reviewed your changes and they look great!


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.

Synchronize source files from linuxdeepin/dtkdeclarative.

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

deepin pr auto review

代码审查意见:

  1. 颜色值重复计算

    • normalDarkhovered状态中,crystal颜色的透明度值重复计算,可以提取为一个变量以提高代码的可读性和可维护性。
  2. 颜色值硬编码

    • hoveredpressed状态中,crystal颜色的RGB值被硬编码为(0, 0, 0),这可能是一个错误,应该检查是否应该使用与normalDark相同的颜色值。
  3. 状态命名不一致

    • hoveredDarkpressedDark状态在normalDarkhovered状态中分别被命名为normalDarkhoveredDark,这可能会导致混淆。建议保持状态命名的一致性。
  4. 代码格式化

    • 代码格式不一致,例如hoveredpressed状态中的颜色值没有对齐,建议统一代码格式以提高可读性。
  5. 注释缺失

    • 代码中没有注释说明为什么某些颜色值被更改,建议添加注释以便其他开发者理解更改的原因。
  6. 颜色值计算逻辑

    • normalDarkhoveredDark状态中,颜色值是通过D.DTK.makeColor方法计算得到的,但是pressedDark状态中的颜色值是硬编码的,建议保持一致性。
  7. 代码重复

    • normalDarkpressedDark状态中的crystal颜色值重复计算,建议提取为一个变量。

综合以上意见,建议对代码进行重构,以提高代码的可读性、可维护性和一致性。

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Aug 14, 2025

TAG Bot

New tag: 6.0.41
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #289

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Sep 4, 2025

TAG Bot

New tag: 6.0.42
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #300

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.

2 participants