-
Notifications
You must be signed in to change notification settings - Fork 143
fix: [Device] [Keyboard] Keyboard test text appears too large #2994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
-- 【设备】【键盘】键盘测试文字偏大 Influence:【设备】【键盘】键盘测试文字 Log: 修复【控制中心】【设备】【键盘】键盘测试文字偏大 PMS: BUG-310105
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: electricface The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the keyboard test text styling by switching the font preset used in the common keyboard QML component to reduce the displayed text size. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've left some high level feedback:
- If
t8is now the preferred design token for this context, consider adding a short comment or using a more semantically named font style (e.g., akeyboardTestTextFontalias) so the intent is clearer and future design changes are easier to propagate. - Given the horizontal alignment depends on
textMetrics.boundingRect.width > width, it may be worth manually checking that the new smaller font size still produces the desired centering/right-alignment behavior and does not result in awkward spacing or truncation in typical layouts.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- If `t8` is now the preferred design token for this context, consider adding a short comment or using a more semantically named font style (e.g., a `keyboardTestTextFont` alias) so the intent is clearer and future design changes are easier to propagate.
- Given the horizontal alignment depends on `textMetrics.boundingRect.width > width`, it may be worth manually checking that the new smaller font size still produces the desired centering/right-alignment behavior and does not result in awkward spacing or truncation in typical layouts.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
deepin pr auto review这段代码修改将字体大小从 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
总结与改进建议该修改在语法和性能上没有问题,主要是为了适配 UI 设计调整字体大小。为了提高代码的健壮性和可维护性,建议进行以下改进:
修改后的建议代码示例(假设存在 CommonStyle): // 假设在 Common.qml 或其他公共文件中定义了样式
// property font inputPlaceholderFont: D.DTK.fontManager.t8
// 在当前组件中使用
font: CommonStyle.inputPlaceholderFont 如果只是临时调整或该处样式非常特殊,目前的写法也是可以接受的。 |
--
【设备】【键盘】键盘测试文字偏大
Influence:【设备】【键盘】键盘测试文字
Log: 修复【控制中心】【设备】【键盘】键盘测试文字偏大
PMS: BUG-310105
Summary by Sourcery
Bug Fixes: