Repository navigation
fix: align search count text with content in delegate - #440
Draft
GongHeng2017 wants to merge 1 commit into
Draft
GongHeng2017 wants to merge 1 commit into
GongHeng2017 wants to merge 1 commit into
Conversation
1. Root cause: SearchResDelegate::paint() calculated search count text x-position with a hardcoded -20 right margin, while content text and bottom line used option.rect.right() directly (0px margin) 2. Fix: remove the -20 offset so search count text right edge aligns with content text and bottom line right edge 3. Impact: only affects search result sidebar item rendering; no signature change, no effect on other delegates or widgets Log: fix search count text right margin misalignment in sidebar Influence: 1. Test search result list items show count text aligned with content 2. Test alignment under different window widths 3. Verify no regression in dark/light theme rendering fix: 修复搜索结果侧栏数量文本与内容文本右边界不对齐 1. 根因:SearchResDelegate::paint() 计算搜索数量文本 x 坐标时使用了 硬编码 -20 右边距,而内容文本和底线直接使用 option.rect.right() (0px 右边距),导致不对齐 20px 2. 方案:移除 -20 偏移,使搜索数量文本右边界与内容文本及底线右边界对齐 3. 影响:仅影响搜索结果侧栏列表项渲染,不改变函数签名,不影响其他 delegate 或 widget Log: 修复搜索结果侧栏数量文本右边距不对齐问题 Influence: 1. 测试搜索结果列表项中数量文本与内容文本右边界对齐 2. 测试不同窗口宽度下的对齐表现 3. 验证深色/浅色主题下渲染无回归 PMS: BUG-193245
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR fixes a 20-pixel right-edge misalignment in search result sidebar items by removing the hardcoded offset from SearchResDelegate::paint(), while leaving other delegates, widgets, and public interfaces unaffected. Flow diagram for aligned search result item renderingflowchart LR
A[SearchResDelegate::paint] --> B[Compute searchCountTextWidth]
B --> C[drawText at option.rect.right minus searchCountTextWidth]
C --> D[Search count right edge]
E[Content text and bottom line] --> F[option.rect.right]
D --> G[Aligned right edges]
F --> G
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
GongHeng2017
marked this pull request as draft
October 29, 2026 20:42
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: align search count text with content in delegate
text x-position with a hardcoded -20 right margin, while content
text and bottom line used option.rect.right() directly (0px margin)
with content text and bottom line right edge
signature change, no effect on other delegates or widgets
Log: fix search count text right margin misalignment in sidebar
Influence:
fix: 修复搜索结果侧栏数量文本与内容文本右边界不对齐
硬编码 -20 右边距,而内容文本和底线直接使用 option.rect.right()
(0px 右边距),导致不对齐 20px
delegate 或 widget
Log: 修复搜索结果侧栏数量文本右边距不对齐问题
Influence:
PMS: BUG-193245
Summary by Sourcery
Bug Fixes: