feat(servicemenu): 简介支持两行折行,减少不必要省略 - #1319
Open
zzd1314 wants to merge 13 commits into
Open
Conversation
…ister servicemenu
- servicemenu: 封装 loadFont 检查字体加载错误、检查 cmd.Run 错误、 SetTheme 补注释、删除未用参数、简化 clamp 闭包、gocritic assignOp - aifalse: fmt.Errorf 改用 pkg/errors(forbidigo)、切片预分配(prealloc)、 gpTs 改名 gpTS(stylecheck)、gpustate 去掉恒为 nil 的 error 返回(unparam)、 lhm_autosetup 补齐错误检查与未用参数 - abineundo: syscall.Syscall 升级 SyscallN(SA1019)、消除 else-return(revive) - hardware_other: 占位函数未用参数改 _
新增 wrapByWidth 函数,按像素宽度把简介折成最多两行: - ASCII 单词不从中间断开 - 折满两行仍放不下时,末行末尾省略号截断 - 单行简介垂直居中于简介区 同时微调简介字号 22 → 20px(两行布局在 332px 卡宽内更舒展), 名称基线 55 → 50px 为两行简介让位。 本 PR 聚焦简介排版,布局和徽章尺寸在 PR 1318 中调整。
wrapByWidth 引入后 iconD 已在 const 块前声明,下方 const iconD = 28.0 造成 redeclared 错误,golangci-lint typecheck 失败。 CI: golangci-lint ✓ runmain(macos) ✓ (cancelled 依赖 lint 通过)
fumiama
requested changes
Sep 10, 2026
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
新增 wrapByWidth 函数,按像素宽度把插件简介折成最多两行,解决部分长简介过早省略的问题。
核心改动
关联 PR
本 PR 是 #1318 的后续。
验证