fix(wireless): fix title font weight and color for My/Other Networks#588
Conversation
deepin pr auto review★ 总体评分:100分■ 总体评价
■ 详细分析
■ 改进建议代码示例 // 为了减少 PageWirelessDevice.qml 中的代码重复,可将颜色定义提取至顶层或使用公共组件
// 以下是提取公共 Palette 的优化示例
// 在文件顶部或公共 QML 文件中定义
/*
D.Palette {
id: titleTextColor
normal: Qt.rgba(0, 0, 0, 0.9)
normalDark: Qt.rgba(1, 1, 1, 0.9)
}
*/
// 在 PageWirelessDevice.qml 中的使用示例
pageType: DccObject.Item
page: Label {
font: DccUtils.copyFont(D.DTK.fontManager.t5, {
"weight": Font.Medium
})
text: dccObj.displayName
color: D.ColorSelector.textColor
// 直接引用顶层定义的 Palette,避免在每个 Label 中重复声明
property D.Palette textColor: titleTextColor
} |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In both Label definitions the
D.Palette(mineTitleColor/otherTitleColor) andproperty D.Palette textColorare never actually used by thecolorbinding (color: D.ColorSelector.textColor), so either bindcolorto the new palette or remove the unused palette-related code to avoid confusion. - The same palette and font-weight styling logic for "My Networks" and "Other Networks" is duplicated; consider extracting this into a shared helper or component to keep the section title styling consistent and easier to maintain.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In both Label definitions the `D.Palette` (`mineTitleColor`/`otherTitleColor`) and `property D.Palette textColor` are never actually used by the `color` binding (`color: D.ColorSelector.textColor`), so either bind `color` to the new palette or remove the unused palette-related code to avoid confusion.
- The same palette and font-weight styling logic for "My Networks" and "Other Networks" is duplicated; consider extracting this into a shared helper or component to keep the section title styling consistent and easier to maintain.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
1. Change "My Networks" title font weight from bold to Font.Medium 2. Change "Other Networks" title font weight from bold to Font.Medium, keep t6 font size 3. Apply DccTitleObject-style palette color (rgba 0.9 alpha) to both titles to match "My Hotspot" Log: Fix wireless page section titles font weight and color to match hotspot title style Influence: Section titles now match hotspot title style fix(wireless): 修复无线网络"我的网络"和"其他网络"标题字重和颜色 1. 将"我的网络"标题字重从 bold 改为 Font.Medium 2. 将"其他网络"标题字重从 bold 改为 Font.Medium,保持 t6 字号不变 3. 为两个标题应用与"我的热点"一致的 DccTitleObject 调色板颜色(rgba 0.9 透明度) Log: 修复无线网络页面分区标题字重和颜色与热点标题不一致的问题 PMS: BUG-371529 Influence: 标题样式与个人热点模块保持一致
6756e88 to
06f67ca
Compare
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Log: Fix wireless page section titles font weight and color to match hotspot title style
Influence: Section titles now match hotspot title style
fix(wireless): 修复无线网络"我的网络"和"其他网络"标题字重和颜色
Log: 修复无线网络页面分区标题字重和颜色与热点标题不一致的问题
PMS: BUG-371529
Influence: 标题样式与个人热点模块保持一致
Summary by Sourcery
Align wireless page section titles and airplane mode page header styling with the hotspot title and global typography guidelines.
Bug Fixes:
Enhancements: