Update dialog: stop clipping wrapped text (for real this time)#27
Merged
Conversation
…d QFontMetrics-measured label heights (heightForWidth undercounts CJK wrapping); the two earlier attempts were stranded on already-merged PR branches.
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.
背景
更新对话框的长文本裁切修过两次(657079f、7505086),但两次都在推送时撞上"PR 已被合并"的时序——提交搁浅在已合并的分支上,从未进入 main。用户实测三次仍然裁切,即为此故。
改动与实现
_fit():布局定稿后按每个标签实际宽度用 QFontMetrics.boundingRect 测量换行文本高度(QLabel.heightForWidth 在部分字体/DPI 组合下对中日韩换行低估约半行,正是叠字来源),加余量后撑开对话框验证
uv run pytest -q:163 passed / 5 skipped流程教训
连续两次修复因"推送前 PR 已合并"而搁浅。今后每次推送修复前先
gh pr view --json state确认目标 PR 仍然开放;若已合并则从最新 main 开新分支。