Skip to content

fix(edit): use 60% alpha for focus border - #733

Merged
18202781743 merged 1 commit into
linuxdeepin:v25-flowstylefrom
iCancely:fix/edit-focus-border-alpha
Oct 22, 2026
Merged

18202781743 merged 1 commit into
linuxdeepin:v25-flowstylefrom
iCancely:fix/edit-focus-border-alpha

Conversation

@iCancely

@iCancely iCancely commented Oct 21, 2026 •

Copy link
Copy Markdown

Summary

  • Apply 60% alpha to the highlight color used by EditPanel focus borders.
  • Keep FocusBoxBorder unchanged so other controls retain full opacity.
  • Limit the change to the Qt6 implementation.

Test

  • Verified the focused border alpha is 0.6 at runtime.
  • Built the Qt6 unit-test target successfully.

摘要

  • 为 EditPanel 聚焦边框使用的高亮色应用 60% 不透明度。
  • 保持 FocusBoxBorder 不变,其他控件仍为全不透明。
  • 仅修改 Qt6 实现。

测试

  • 运行时验证聚焦边框 alpha 为 0.6。
  • Qt6 unit-test 目标构建通过。

Summary by Sourcery

Bug Fixes:

  • Adjust the Qt6 EditPanel focus border to render the highlight color at 60% opacity.

@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The Qt6 EditPanel focus border now renders the palette highlight color at 60% opacity, while the shared border component and other controls retain full opacity.

File-Level Changes

Change Details Files
Apply a semi-transparent highlight color specifically to EditPanel's focus border.
  • Wrap the palette highlight color with Qt.alpha(..., 0.6) when constructing the focus border.
  • Leave the shared FocusBoxBorder component and other controls unchanged.
  • Scope the implementation change to the Qt6 QML file.
qt6/src/qml/EditPanel.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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@iCancely

Copy link
Copy Markdown
Author

@18202781743

Comment thread qt6/src/qml/EditPanel.qml Outdated
active: control.activeFocus
sourceComponent: FocusBoxBorder {
color: control.palette.highlight
color: Qt.alpha(control.palette.highlight, 0.6)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这个可以搞个dtk的接口去调透明度,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

已改用 DTK 的 makeColor().opacity(-40) 调整为 60% 不透明度,运行时验证聚焦边框颜色为 #99308cc6。

@iCancely
iCancely force-pushed the fix/edit-focus-border-alpha branch from 05ec41c to 1deec07 Compare October 21, 2026 09:10
1. Use the DTK color API to apply 60% alpha to the highlight color used by EditPanel focus borders.
2. Keep FocusBoxBorder unchanged so other focus borders remain fully opaque.
3. Limit the change to the Qt6 EditPanel implementation.

Log: Reduce the Qt6 edit focus border alpha to 60%.
Influence: Only Qt6 edit controls show a lighter focused border.

fix(edit): 输入框聚焦边框使用 60% 不透明度

1. 使用 DTK 颜色接口为 EditPanel 聚焦边框的高亮色应用 60% 不透明度。
2. 保持 FocusBoxBorder 不变,其他聚焦边框仍为全不透明。
3. 仅修改 Qt6 的 EditPanel 实现。

Log: 将 Qt6 输入框聚焦边框不透明度降低为 60%。
Influence: 仅影响 Qt6 输入控件的聚焦边框显示。
@iCancely
iCancely force-pushed the fix/edit-focus-border-alpha branch from 1deec07 to 50c7fa6 Compare October 21, 2026 09:12
@deepin-ci-robot

Copy link
Copy Markdown
Contributor

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 100 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次变更将 EditPanel.qml 中焦点边框颜色从直接使用 palette.highlight 修改为通过 D.DTK.makeColor API 设置 60% 透明度, commit 目的明确(fix(edit): use 60% alpha for focus border),代码改动仅 1 行,语法正确、逻辑清晰, 使用了 DTK 框架原生颜色操作 API,无安全漏洞,四维度均通过。

🔍 详细分析

1. 语法逻辑 ✅

评价: 语法正确,逻辑清晰 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


2. 代码质量 ✅

评价: 代码结构清晰,注释完整 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


3. 代码性能 ✅

评价: 性能良好,资源使用合理 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


4. 代码安全 🔒

评价: 存在0个安全漏洞 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: []


💡 改进建议代码示例

// 当前代码已为最佳实现,无需修改 // qt6/src/qml/EditPanel.qml Loader {
    anchors.fill: parent
    active: control.activeFocus
    sourceComponent: FocusBoxBorder {
        color: D.DTK.makeColor(control.palette.highlight).opacity(-40).color()
        radius: panel.radius
    }
}

本报告由 AI 代码审查工具自动生成

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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
18202781743 merged commit fc9cffc into linuxdeepin:v25-flowstyle Oct 22, 2026
19 of 20 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