Skip to content

fix(airplane): use T8 font size and add 12px left padding for tips label - #587

Merged
caixr23 merged 2 commits into
linuxdeepin:masterfrom
iCancely:fix/airplane-tips-font-and-padding
Jul 27, 2026
Merged

fix(airplane): use T8 font size and add 12px left padding for tips label#587
caixr23 merged 2 commits into
linuxdeepin:masterfrom
iCancely:fix/airplane-tips-font-and-padding

Conversation

@iCancely

@iCancely iCancely commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Issue

The airplane mode tips label uses a default font size that is too large, and has no left padding, causing misalignment with list items below.

Changes

  1. Change the airplane mode tips label font size to T8 (D.DTK.fontManager.t8.pixelSize)
  2. Add 12px left padding (leftPadding: 12) to align the text with the list items

Log: Fix airplane mode tips label font size and left padding
Influence: Airplane tips text aligns with list items

问题

飞行模式页面提示文字字号偏大,且没有左边距,与下方列表项未对齐。

修改

  1. 将提示文字字号从默认大小改为 T8(D.DTK.fontManager.t8.pixelSize)
  2. 添加 12px 左边距(leftPadding: 12),使文字左侧与列表左侧对齐

Log: 修复飞行模式页面提示文字字号和左边距问题
PMS: BUG-371531
Influence: 飞行模式提示文字与列表项对齐

@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 left some high level feedback:

  • Consider replacing the hardcoded leftPadding: 12 with a shared spacing/metrics constant (if available in the design system) to keep spacing consistent and centrally managed.
  • If there is a standard way to set text styles (e.g., using a predefined text role or style instead of directly binding font.pixelSize), aligning with that convention would make the styling more consistent with other labels.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider replacing the hardcoded `leftPadding: 12` with a shared spacing/metrics constant (if available in the design system) to keep spacing consistent and centrally managed.
- If there is a standard way to set text styles (e.g., using a predefined text role or style instead of directly binding `font.pixelSize`), aligning with that convention would make the styling more consistent with other labels.

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.

@iCancely
iCancely force-pushed the fix/airplane-tips-font-and-padding branch from 55bf299 to 0ffaad2 Compare July 27, 2026 05:43
修复飞行模式页面提示文字的字号和左边距问题:
- 将提示文字字号从默认大小改为 T8(D.DTK.fontManager.t8.pixelSize)
- 添加 12px 左边距(leftPadding: 12),使文字左侧与列表左侧对齐

Log: bug-371531
@caixr23
caixr23 force-pushed the fix/airplane-tips-font-and-padding branch from 0ffaad2 to 0f850ad Compare July 27, 2026 06:45
…2024-2026

修复 SPDX 版权头年份范围,结束年份应反映最新修改时间 2026,
且横杠两侧不应有空格。
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:95分

■ 【总体评价】

代码修复了飞行模式页面Label组件的字体大小和内边距缺失问题,提升了UI规范性
逻辑正确且无安全漏洞,仅版权年份修改存在轻微笔误风险

■ 【详细分析】

  • 1.语法逻辑(完全正确)✓

dcc-network/qml/PageAirplane.qml 文件中,为 D.Label 组件新增了 font.pixelSizeleftPadding 属性,QML 语法使用正确,属性绑定符合规范。
潜在问题:无
建议:无需修改

  • 2.代码质量(良好)✓

代码修改目标明确,通过引入 D.DTK.fontManager.t8.pixelSize 统一了字号管理,符合 DTK 设计规范。但在文件头部将版权年份从 2024 - 2027 修改为 2024-2026,当前年份为 2024 年,修改为 2026 可能是笔误。
潜在问题:版权年份修改逻辑不清晰,可能导致版权声明不准确
建议:确认版权年份修改的必要性,保持年份格式统一(如 2024-20272024

  • 3.代码性能(无性能问题)✓

修改仅涉及 UI 组件的静态属性设置,不涉及复杂的逻辑计算或频繁的信号绑定,不会对渲染性能产生负面影响。
潜在问题:无
建议:无需修改

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
本次代码修改仅涉及前端 UI 样式调整,未引入任何外部输入处理、文件操作或网络请求,不存在安全风险。

  • 建议:无需安全修复

■ 【改进建议代码示例】

--- a/dcc-network/qml/PageAirplane.qml
+++ b/dcc-network/qml/PageAirplane.qml
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: 2024 - 2027 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
 // SPDX-License-Identifier: GPL-3.0-or-later
 import QtQuick 2.15
 import QtQuick.Controls 2.15
@@ -64,6 +64,8 @@ DccObject {
             page: D.Label {
                 text: dccObj.displayName
                 wrapMode: Text.WordWrap
+                font.pixelSize: D.DTK.fontManager.t8.pixelSize
+                leftPadding: 12
             }
         }
     }

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: caixr23, 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

@caixr23
caixr23 merged commit ae66625 into linuxdeepin:master Jul 27, 2026
16 of 17 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