Skip to content

Conversation

@18202781743
Copy link
Contributor

@18202781743 18202781743 commented Apr 7, 2025

1.Update icons.
2.Update background of Window.
3.Update items background for listview.

pms: BUG-311127

Summary by Sourcery

Refactor and update the UI for on-screen display (OSD) components, adjusting visual styles and color palettes across multiple QML files.

Bug Fixes:

  • Fix visual inconsistencies in OSD UI elements across different components

Enhancements:

  • Modify background and shadow colors for OSD components to improve visual consistency
  • Update color opacity and shadow properties for list view items
  • Adjust current item highlighting and color selection

1.Update icons.
2.Update background of Window.
3.Update items background for listview.

pms: BUG-311127
@sourcery-ai
Copy link

sourcery-ai bot commented Apr 7, 2025

Reviewer's Guide by Sourcery

This pull request focuses on improving the UI of the OSD (On-Screen Display) by updating icons, adjusting the background of the Window, and refining the appearance of items within list views. The changes involve modifications to color palettes, shadow effects, and background components to enhance visual clarity and aesthetics.

Updated class diagram for AppletItem

classDiagram
    class AppletItem {
        -property string iconName
        -property string title
        -property string description
        +property bool isCurrent
        -property D.Palette backgroundColor
        -property D.Palette checkedBackgroundColor
        -property D.Palette dropShadowColor
        -property D.Palette innerShadowColor
    }
    note for AppletItem "Added property 'isCurrent'"
    note for AppletItem "Updated properties 'dropShadowColor' and 'innerShadowColor'"
Loading

Updated class diagram for Window

classDiagram
    class Window {
        -property D.FloatingPanel background
    }
    class D.FloatingPanel {
        +property D.Palette backgroundColor
        +property D.Palette insideBorderColor
        +property D.Palette outsideBorderColor
        +property D.Palette dropShadowColor
    }
    note for D.FloatingPanel "Added properties 'backgroundColor', 'insideBorderColor', 'outsideBorderColor', and 'dropShadowColor'"
Loading

File-Level Changes

Change Details Files
Updated the background color and shadows for list view items to improve visual clarity and aesthetics.
  • Adjusted the normal and normalDark values for the background color to use a slightly lighter shade.
  • Modified the normalDark value for the drop shadow color to enhance the shadow effect in dark mode.
  • Modified the normalDark value for the inner shadow color to improve the inner shadow effect in dark mode.
  • Added a visibility condition to the BoxShadow and BoxInsetShadow to hide them when the item is current.
panels/notification/osd/windoweffect/package/main.qml
panels/notification/osd/displaymode/package/main.qml
panels/notification/osd/kblayout/package/main.qml
Modified the Window background using the D.FloatingPanel component and adjusted its properties.
  • Set the background to D.FloatingPanel.
  • Defined background color for normal and dark modes.
  • Defined inside border color for normal and dark modes.
  • Defined outside border color for normal and dark modes.
  • Set drop shadow color to null.
panels/notification/osd/package/main.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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 文件差异

    • osd_display_copy.dci, osd_display_custom1.dci, osd_display_custom2.dci, osd_display_expansion.dci 等文件是二进制文件,这些文件的变化可能是图标或图像的更新,而不是代码逻辑的修改。因此,这些文件的差异不需要代码审查。
  2. 代码修改

    • main.qml 文件中,backgroundColor 的透明度从 0.4 修改为 0.3,这可能会影响界面的视觉效果,需要确认这是否符合设计要求。
    • dropShadowColorinnerShadowColor 的颜色值在 normalDarknormal 之间进行了调整,这可能会影响深色模式下的阴影效果,需要确认这些颜色值是否符合设计规范。
    • main.qml 文件中,color 属性的值从 Applet.currentPlanItem && Applet.currentPlanItem.key === model.key ? D.DTK.platformTheme.activeColor : palette.windowText 修改为 palette.windowText,这可能会影响当前计划项的文本颜色,需要确认这是否符合功能需求。
    • main.qml 文件中,visible 属性在 D.BoxShadowD.BoxInsetShadow 中被设置为 !itemView.isCurrent,这可能会影响阴影的显示,需要确认这是否符合设计要求。
    • main.qml 文件中,visible 属性在 item_checked 图标中从 control.checkedIndex === itemView.index 修改为 itemView.isCurrent,这可能会影响图标的选择状态,需要确认这是否符合功能需求。
    • main.qml 文件中,color 属性在 backgroundRect 中从 control.selectIndex === itemView.index ? itemView.D.ColorSelector.checkedBackgroundColor : itemView.D.ColorSelector.backgroundColor 修改为 itemView.isCurrent ? itemView.D.ColorSelector.checkedBackgroundColor : itemView.D.ColorSelector.backgroundColor,这可能会影响背景颜色的显示,需要确认这是否符合设计要求。
  3. 代码质量

    • 代码中的注释和文档应该更新,以反映这些更改,以便其他开发者理解这些修改的原因和影响。
    • 代码风格应该保持一致,例如颜色值的小数点后位数应该统一。
  4. 代码性能

    • 没有明显的性能问题,但是应该注意不要在渲染循环中执行复杂的计算或频繁地更新UI。
  5. 代码安全

    • 没有涉及到安全性的修改,但是应该确保所有用户输入都经过适当的验证和清理,以防止安全漏洞。

总体来说,这些修改看起来是为了调整UI的视觉效果和交互行为,需要确保这些更改符合设计规范和功能需求。同时,应该更新相关的文档和注释,以便其他开发者能够理解这些更改。

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:

Overall Comments:

  • Consider defining the color palettes in a central location to avoid duplication.
  • It might be good to use a consistent naming scheme for the color palette properties.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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.

@deepin-ci-robot
Copy link

[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

@18202781743
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Apr 7, 2025

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit 1938ef3 into linuxdeepin:master Apr 7, 2025
6 of 7 checks passed
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