Skip to content

Conversation

@BLumia
Copy link
Member

@BLumia BLumia commented Jan 27, 2026

默认托盘区域的 tooltip 文字大小比托盘插件里的文字大小要大,因为字号是t6,根据设计建议应当调整到t8.

另注: 应用区域的 tooltip (也包括启动器,全局搜索图标) 使用的是相同控件,都会使用同一字号,已确认此行为无误.

Summary by Sourcery

Bug Fixes:

  • Align tray and application tooltip font size with design by switching from the larger t6 font to the smaller t8 font.

默认托盘区域的 tooltip 文字大小比托盘插件里的文字大小要大,因为字号
是t6,根据设计建议应当调整到t8.

另注: 应用区域的 tooltip (也包括启动器,全局搜索图标) 使用的是相同
控件,都会使用同一字号,已确认此行为无误.

PMS: BUG-326409
Log:
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 27, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the default tooltip font size in the panel/tray to use the smaller t8 font style instead of t6, aligning tray tooltip text with tray plugin text per design guidance.

File-Level Changes

Change Details Files
Align panel tooltip typography with design by switching to the smaller t8 font style.
  • Update tooltip font family reference from DTK.fontManager.t6.family to DTK.fontManager.t8.family
  • Update tooltip font pixel size reference from DTK.fontManager.t6.pixelSize to DTK.fontManager.t8.pixelSize
frame/qml/PanelToolTip.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 - 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.

@deepin-ci-robot
Copy link

deepin pr auto review

这段代码修改了QML文件中PanelToolTip组件的字体设置,将字体从t6调整为t8。以下是对这段diff的详细审查和改进建议:

1. 代码逻辑审查

  • 修改内容:代码将Text元素的字体属性从DTK.fontManager.t6修改为DTK.fontManager.t8
  • 逻辑合理性
    • 通常在UI设计系统中,字体编号(如t6, t8)对应不同的字号和行高。数字越大,通常字号越小(或者根据具体设计规范而定)。
    • 如果PanelToolTip是工具提示,通常需要较小的字号以避免遮挡过多内容。如果t8t6字号更小,那么这个修改是符合UI设计逻辑的。
    • 建议:请确认DTK设计规范中t8是否确实是工具提示应当使用的标准字号。

2. 代码质量与规范

  • 格式规范:Diff格式标准,缩进与上下文保持一致,符合QML代码规范。
  • 可读性:代码清晰,直接引用了DTK.fontManager,便于统一管理字体样式,符合组件化开发原则。

3. 代码性能

  • 性能影响:此修改仅涉及属性绑定的更改,对性能几乎没有影响。QML引擎会在加载时解析这些属性。

4. 代码安全

  • 安全性:此修改不涉及网络、文件操作或用户输入,因此没有直接的安全隐患。
  • 健壮性
    • 代码依赖外部对象DTKtoolTipWindow
    • 潜在风险:如果DTK.fontManager未初始化,或者t8属性不存在,程序将在运行时抛出错误。
    • 建议:确保DTK单例在使用前已经完全加载,或者增加防御性代码(虽然QML中通常依赖环境配置)。

5. 综合改进建议

  1. 验证设计规范

    • 确保此次更改符合产品的UI/UX设计规范文档。如果t8是专门用于Tips/Tooltip的字号,则修改正确;如果是误用(例如本应使用t6但误改为了t8),则需要回滚。
  2. 考虑多语言/国际化支持

    • capitalization: Font.Capitalize 会对文本进行首字母大写处理。对于中文等非字母语言通常无效,但对于英文提示语,这会改变显示内容。
    • 审查点:确认工具提示的内容是否需要强制首字母大写。如果提示语是句子(如 "Click to open"),Capitalize 可能会导致显示不符合语法(变为 "Click To Open")。如果只是单词(如 "Open"),则无问题。
  3. 代码健壮性增强(可选)

    • 如果担心DTK.fontManager.t8在某些版本中不可用,可以设置一个回退值,但这通常由DTK框架保证,此处改动不是必须的。

总结

这段代码修改在语法上是正确的,逻辑上符合工具提示使用较小字号的惯例。建议在合并前确认t8确实是设计规范中指定的工具提示字体,并检查capitalization属性是否对所有语言的提示文本显示友好。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@BLumia BLumia merged commit 0a2f821 into linuxdeepin:master Jan 27, 2026
8 of 11 checks passed
@BLumia BLumia deleted the t6-t8 branch January 27, 2026 09:40
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