Repository navigation
fix: unify lineNumberAreaWidth to resolve wide left panel - #703
Draft
pppanghu77 wants to merge 1 commit into
Draft
pppanghu77 wants to merge 1 commit into
pppanghu77 wants to merge 1 commit into
Conversation
1. Root cause: LeftAreaTextEdit::lineNumberAreaWidth() returned an inflated width (13 + adv*digits + 40) while TextEdit's version returned max(15, adv*digits), causing LineNumberArea::sizeHint() to use the inflated value for initial layout 2. Fix: delegate to m_pTextEdit->lineNumberAreaWidth() so sizeHint() and setFixedWidth() use the same width, eliminating the conflict 3. Impact: blank tab left panel no longer starts oversized; no change to normal width after updateLeftWidgetWidth() correction Log: fix blank tab left panel width inconsistency on startup Influence: 1. Verify blank tab left panel width is correct on startup 2. Verify left panel width after closing and reopening tabs 3. Test line number area width with large files fix: 统一行号区宽度计算消除左侧栏偏宽 1. 根因:LeftAreaTextEdit::lineNumberAreaWidth() 返回膨胀宽度 (13 + adv*digits + 40),而 TextEdit 版本返回 max(15, adv*digits), 导致 LineNumberArea::sizeHint() 用膨胀值做初始布局 2. 方案:委托调用 m_pTextEdit->lineNumberAreaWidth(),使 sizeHint() 与 setFixedWidth() 使用同一宽度值,消除双实现冲突 3. 影响:空白标签页左侧栏不再初始偏宽;updateLeftWidgetWidth() 纠正后的宽度无变化 Log: 修复空白标签页左侧栏宽度偏大的问题 Influence: 1. 验证打开空白标签页时左侧栏宽度正常 2. 验证关闭后重新打开标签页的左侧栏宽度 3. 测试大文件场景下行号区宽度 PMS: BUG-174621
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pppanghu77 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 |
pppanghu77
marked this pull request as draft
October 29, 2026 19:14
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR removes the duplicate, inflated line-number width calculation from LeftAreaTextEdit and delegates to TextEdit's shared calculation, keeping initial sizing consistent while preserving corrected widths after updates. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
fix: unify lineNumberAreaWidth to resolve wide left panel
inflated width (13 + advdigits + 40) while TextEdit's version
returned max(15, advdigits), causing LineNumberArea::sizeHint()
to use the inflated value for initial layout
and setFixedWidth() use the same width, eliminating the conflict
to normal width after updateLeftWidgetWidth() correction
Log: fix blank tab left panel width inconsistency on startup
Influence:
fix: 统一行号区宽度计算消除左侧栏偏宽
(13 + advdigits + 40),而 TextEdit 版本返回 max(15, advdigits),
导致 LineNumberArea::sizeHint() 用膨胀值做初始布局
与 setFixedWidth() 使用同一宽度值,消除双实现冲突
纠正后的宽度无变化
Log: 修复空白标签页左侧栏宽度偏大的问题
Influence:
PMS: BUG-174621
Summary by Sourcery
Bug Fixes: