Skip to content

Conversation

@deepin-ci-robot
Copy link
Contributor

@deepin-ci-robot deepin-ci-robot commented Jul 23, 2025

Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#505

Summary by Sourcery

Synchronize style definitions by adding and updating palette entries in FlowStyle.qml and refactor ProgressBarPanel.qml to leverage the new background palette property

Enhancements:

  • Add a shadowInner2 palette entry and a reusable background palette with semi-transparent black for light and white for dark themes in FlowStyle.qml
  • Update embeddedProgressBar background palette to use white for the dark variant
  • Refactor ProgressBarPanel.qml to expose a backgroundColor property bound to DS.Style.progressBar.background and replace the hardcoded color

@deepin-ci-robot
Copy link
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

sourcery-ai bot commented Jul 23, 2025

Reviewer's Guide

This pull request syncs QML style definitions from linuxdeepin/dtkdeclarative by extending FlowStyle palettes with new background entries and normal colors, adjusting embeddedProgressBar color values, and refactoring ProgressBarPanel to use centralized style properties.

Entity relationship diagram for FlowStyle and ProgressBarPanel palette changes

erDiagram
    FLOWSTYLE ||--o{ PALETTE : uses
    FLOWSTYLE ||--o{ EMBEDDEDPROGRESSBAR : contains
    EMBEDDEDPROGRESSBAR ||--o{ PALETTE : uses
    PROGRESSBARPANEL ||--o{ RECTANGLE : contains
    RECTANGLE ||--o{ PALETTE : uses

    FLOWSTYLE {
        string shadowInner2
        string handleGradientColor
        string background
    }
    EMBEDDEDPROGRESSBAR {
        string background
        string progressBackground
    }
    PALETTE {
        string normal
        string normalDark
    }
    PROGRESSBARPANEL {
        string _normalTextComponent
    }
    RECTANGLE {
        string backgroundColor
        string color
        string radius
    }
Loading

Class diagram for updated FlowStyle and ProgressBarPanel QML properties

classDiagram
    class FlowStyle {
        +D.Palette shadowInner2
        +D.Palette handleGradientColor
        +D.Palette background (new)
        +QtObject embeddedProgressBar
    }
    class D.Palette {
        +normal
        +normalDark
    }
    class embeddedProgressBar {
        +D.Palette background (normal, normalDark updated)
        +D.Palette progressBackground
    }
    class ProgressBarPanel {
        +Component _normalTextComponent
    }
    class Rectangle {
        +Palette backgroundColor (new)
        +radius
        +color (now uses ColorSelector.backgroundColor)
    }
    FlowStyle --> D.Palette : uses
    FlowStyle --> embeddedProgressBar : contains
    embeddedProgressBar --> D.Palette : uses
    ProgressBarPanel --> Rectangle : contains
    Rectangle --> Palette : uses
Loading

File-Level Changes

Change Details Files
Extended FlowStyle QML definitions with new palette entries and adjusted color values
  • Added normal color to shadowInner2 palette (rgba(0,0,0,0.1))
  • Introduced background palette with normal and normalDark entries
  • Adjusted embeddedProgressBar background normalDark to white
qt6/src/qml/FlowStyle.qml
Refactored ProgressBarPanel to use the centralized style background property
  • Added property to expose DS.Style.progressBar.background as backgroundColor
  • Replaced hardcoded color with ColorSelector.backgroundColor
qt6/src/qml/private/ProgressBarPanel.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 @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#505
@deepin-ci-robot
Copy link
Contributor Author

deepin pr auto review

代码审查意见:

  1. FlowStyle.qml 文件中,新增的 background 属性在 handleGradientColor 属性下方,建议根据代码结构和可读性,将新属性放置在适当的位置,比如在 handleGradientColor 属性的上方或下方,以保持代码的整洁。

  2. FlowStyle.qml 文件中,shadowInner2 属性的 normalnormalDark 颜色值相同,均为 Qt.rgba(0, 0, 0, 0.1),这可能是一个错误,需要确认是否应该保持一致。

  3. FlowStyle.qml 文件中,embeddedProgressBar 属性的 background 属性中,normalDark 的颜色值从 Qt.rgba(0, 0, 0, 0.2) 更改为 Qt.rgba(1, 1, 1, 0.2),需要确认这一更改是否符合设计要求,以及是否所有相关的颜色值都进行了相应的调整。

  4. ProgressBarPanel.qml 文件中,_normalTextComponent 组件的 color 属性被替换为 ColorSelector.backgroundColor,需要确认 ColorSelector.backgroundColor 是否已经定义,并且其值是否正确。

  5. ProgressBarPanel.qml 文件中,backgroundColor 属性被添加到 _normalTextComponent 组件中,但是没有在代码中看到对应的 ColorSelector.backgroundColor 属性的定义,需要确保 ColorSelector 对象和 backgroundColor 属性已经正确定义。

  6. 代码中没有明显的语法错误或逻辑错误,但是建议在修改颜色值时,确保这些值符合设计规范,并且与现有代码库中的其他颜色值保持一致。

  7. 代码中没有涉及到性能和安全性的问题,但是建议在未来的开发中,考虑使用更高效的颜色处理方法,以及确保所有颜色值的使用都是安全的,不会对用户界面造成负面影响。

@18202781743 18202781743 merged commit 1396ff2 into master Jul 24, 2025
14 of 15 checks passed
@18202781743 18202781743 deleted the sync-pr-505-nosync branch July 24, 2025 02:45
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