Conversation
In non-fashion mode, dockRawCenterSpace did not account for GridLayout column spacing, causing the center app icon area to extend ~10-20px into the tray area when many apps are open, producing slight overlap. Deduct columnSpacing (1x when dockLeftPart is hidden, 2x when visible) from the maximum center width calculation. Also add clip: true to OverflowContainer's ListView as a visual safety net. PMS: BUG-368011 Log: Influence: 非时尚模式下应用图标与托盘图标区域不再轻微重叠
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy 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 GuideThe dock now reserves the appropriate column spacing in non-fashion mode and clips overflow content, preventing densely populated app icons from visually overlapping the tray while leaving fashion-mode behavior unchanged. Flow diagram for dock center-space calculationflowchart TD
A[dockRawCenterSpace] --> B{fashionDock.visible}
B -->|yes| C[Deduct 2 column spacings and floating margins]
B -->|no| D{gridLayout exists}
D -->|yes| E[Deduct one column spacing]
E --> F{dockLeftPart.visible}
F -->|yes| G[Deduct a second column spacing]
F -->|no| H[Return non-negative center space]
G --> H
D -->|no| H
C --> H
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例// 暂无代码示例本报告由 AI 代码审查工具自动生成 |
|
TAG Bot New tag: 2.0.55 |
|
TAG Bot New tag: 2.0.56 |
Root Cause Analysis
In non-fashion mode (efficient mode),
dockRawCenterSpacecalculates the maximum width of the center app icon area asScreen.width - dockLeftPart.implicitWidth - dockRightPart.implicitWidthwithout deductinggridLayout.columnSpacing. When many apps fill the center area to its maximum width, the right edge extends ~10-20px (1-2 column spacings) into the tray area (dockRightPart), causing slight visual overlap.Key evidence:
columnSpacing * 2in the same property, but the non-fashion branch was never adjustedOverflowContainer.qml'sListViewlacksclip: true, allowing visual overflow even when layout width is constrainedFix
dockRawCenterSpace(main.qml), add anelse ifbranch for non-fashion mode that deductscolumnSpacing(1x whendockLeftPartis hidden, 2x when visible) from the space calculationclip: truetoOverflowContainer.qml'sListViewas a visual safety netChange Safety Assessment
clipproperty; no structural layout changesBusiness Impact
Verification Suggestions
根因分析
非时尚模式(高效模式)下,
dockRawCenterSpace计算中间应用图标区域最大宽度时未扣除gridLayout.columnSpacing。当应用图标撑满该最大宽度时,右边缘侵入托盘区域约 10-20px(1-2 个列间距),产生轻微重叠。关键证据:
columnSpacing * 2,但非时尚模式分支从未调整OverflowContainer.qml的ListView缺少clip: true,即使布局宽度被约束仍可视觉溢出修复方案
dockRawCenterSpace(main.qml)中为非时尚模式添加else if分支,扣除columnSpacing(dockLeftPart不可见时 1x,可见时 2x)OverflowContainer.qml的ListView添加clip: true作为视觉兜底改动安全评估
业务影响范围
验证建议
Summary by Sourcery
Prevent dock app icons from overlapping the tray area in non-fashion mode.
Bug Fixes: