Repository navigation
fix: show scrollbar in file list views - #841
Draft
pppanghu77 wants to merge 1 commit into
Draft
pppanghu77 wants to merge 1 commit into
pppanghu77 wants to merge 1 commit into
Conversation
|
[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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideChanges the vertical scrollbar policy from AlwaysOff to AsNeeded in the backup disk list and shared file/app/config selection list, restoring scrollbar visibility only when content overflows without altering other list behavior. Flow diagram for on-demand scrollbar visibilityflowchart LR
A["List content"] --> B{"Content exceeds viewport?"}
B -->|No| C["Scrollbar hidden"]
B -->|Yes| D["Scrollbar shown"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
pppanghu77
marked this pull request as draft
October 29, 2026 19:34
pppanghu77
force-pushed
the
agent/agent/967075547759
branch
from
October 29, 2026 20:45
6e405ac to
a6447db
Compare
1. Root cause: SelectListView and CreateBackupFileWidget explicitly set vertical scrollbar policy to ScrollBarAlwaysOff, hiding the scrollbar even when content overflows the viewport 2. Fix: change policy from ScrollBarAlwaysOff to ScrollBarAsNeeded in item.cpp:727 and createbackupfilewidget.cpp:256, restoring the Qt default behavior where scrollbar appears on demand 3. Impact: FileSelectWidget, AppSelectWidget, ConfigSelectWidget and CreateBackupFileWidget all benefit from restored scrollbar; no behavior change when content fits within the viewport Log: Restore scrollbar visibility in data-transfer file list views Influence: 1. Test file browsing with more items than viewport height 2. Test disk selection list with overflow content 3. Verify scrollbar hidden when content fits viewport fix: 恢复文件列表视图的滚动条显示 1. 根因:SelectListView 和 CreateBackupFileWidget 显式将垂直滚动条 策略设为 ScrollBarAlwaysOff,导致内容超出视口时滚动条仍隐藏 2. 方案:将 item.cpp:727 和 createbackupfilewidget.cpp:256 的策略 从 ScrollBarAlwaysOff 改为 ScrollBarAsNeeded,恢复 Qt 默认行为 3. 影响:FileSelectWidget、AppSelectWidget、ConfigSelectWidget 及 CreateBackupFileWidget 均受益于滚动条恢复;内容不超出视口时无行为变化 Log: 恢复数据迁移工具文件列表的滚动条显示 Influence: 1. 测试文件数量超出视口时滚动条正常显示 2. 测试磁盘选择列表内容超出视口时滚动条正常显示 3. 验证内容未超出视口时滚动条不显示 PMS: BUG-249127
pppanghu77
force-pushed
the
agent/agent/967075547759
branch
from
October 29, 2026 21:15
a6447db to
0d01296
Compare
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.
Root Cause Analysis
SelectListViewconstructor initem.cpp:727explicitly setssetVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff), permanently hiding the vertical scrollbar even when content overflows the viewport. The same pattern exists increatebackupfilewidget.cpp:256for the disk list view. A minimal PyQt5 demo confirmed thatScrollBarAlwaysOffrenders the scrollbar invisible whileScrollBarAsNeededrestores it — matching the PMS-reported symptom exactly.Fix
Change the vertical scrollbar policy from
ScrollBarAlwaysOfftoScrollBarAsNeededin bothitem.cpp:727andcreatebackupfilewidget.cpp:256, restoring the Qt default behavior where the scrollbar appears on demand.Change Safety Assessment
Code Safety
Business Impact Scope
Verification Suggestion
Test file browsing with more items than viewport height to confirm scrollbar visibility and drag functionality; verify scrollbar hidden when content fits viewport.
根因分析
SelectListView构造函数(item.cpp:727)显式设置setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff),永久隐藏垂直滚动条,即使内容超出视口。createbackupfilewidget.cpp:256的磁盘列表视图存在相同问题。最小 PyQt5 demo 验证:ScrollBarAlwaysOff下滚动条不可见,ScrollBarAsNeeded下恢复正常——与 PMS 报告现象完全一致。修复方案
将
item.cpp:727和createbackupfilewidget.cpp:256的垂直滚动条策略从ScrollBarAlwaysOff改为ScrollBarAsNeeded,恢复 Qt 默认的按需显示行为。改动安全评估
代码安全评估
业务影响范围
验证建议
测试文件浏览页面文件数量超出视口时滚动条可见且可拖动;验证内容未超出视口时滚动条不显示。
Summary by Sourcery
Show vertical scrollbars on file selection lists only when their content overflows the available viewport.
Bug Fixes:
Chores: