docs: fix launcheritem dock size calculation - #803
Conversation
1. The dock exclusion zone calculation incorrectly included full dock thickness 2. Changed to use actual reserved layer-shell zone when TreeLand is active 3. Added dockReservedZone property to read layer shell exclusion zone 4. Dock spacing remains constant while thickness contribution is bounded by reserved zone Log: Fixed dock reserved space calculation for launcher panel Influence: 1. Test launcher popup on dock positions (top, bottom, left, right) 2. Verify TreeLand system tray overlay behavior 3. Confirm minimized window icon alignment unaffected 4. Test other desktop environments without layer-shell support 5. Check dock icon scaling with ultra-wide displays docs: 修复启动器面板 dock 尺寸计算问题 1. 修复了 dock 排除区域计算中错误包含完整 dock 厚度的问题 2. 在 TreeLand 启用时,改用实际预留的 layer-shell 区域 3. 新增 dockReservedZone 属性,用于读取 layer shell 的排除区域 4. Dock 间距保持恒定,而厚度贡献受预留区域约束 Log: 修复启动器面板的 dock 预留空间计算 Influence: 1. 测试启动器弹窗在 dock 不同位置(上、下、左、右)的显示效果 2. 验证 TreeLand 系统托盘叠加层行为 3. 确认最小化窗口图标对齐不受影响 4. 测试其他不支持 layer-shell 的桌面环境 5. 检查超宽屏显示器下 dock 图标缩放效果 PMS: TASK-395113
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates launcher dock exclusion calculation to use the actual TreeLand layer-shell reserved zone, preventing full dock thickness from being double-counted while retaining consistent spacing and icon alignment. Flow diagram for launcher dock exclusion calculationflowchart TD
A[Determine dock orientation] --> B[Read dockThickness]
B --> C{TreeLand active?}
C -->|Yes| D[Read DLayerShellWindow.exclusionZone]
C -->|No| E[Use dockReservedZone = 0]
D --> F[Calculate dockExclusion]
E --> F
F --> G["dockSpacing + max(0, dockThickness - dockReservedZone)"]
G --> H[Calculate iconAlignOffset]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰,边界处理完善 ✓ 评分: 25/25 潜在问题: 代码逻辑分析: 本次修改修复了
边界条件验证:
2. 代码质量 ✅评价: 代码结构清晰,可读性好 ✓ 评分: 23/25 潜在问题:
建议:
3. 代码性能 ✅评价: 性能良好,资源使用合理 ✓ 评分: 20/20 潜在问题: 性能分析:
4. 代码安全 🔒评价: 存在0个安全漏洞 ✓ 评分: 30/30
安全漏洞详情: 漏洞对比统计: 新增漏洞 0 个,减少漏洞 0 个,持平 0 个 安全分析:
💡 改进建议代码示例建议 1:为 dockReservedZone 添加注释 // dock 在 layer-shell 中已预留的排除区域,仅 TreeLand 环境下有效
readonly property int dockReservedZone: DesktopIntegration.isTreeLand() ? Panel.rootObject.DLayerShellWindow.exclusionZone : 0
readonly property int dockExclusion: DesktopIntegration.dockSpacing
+ Math.max(0, dockThickness - dockReservedZone)建议 2:删除尾随空格 // 修改前(第 294 行有尾随空格):
readonly property int dockReservedZone: DesktopIntegration.isTreeLand() ? Panel.rootObject.DLayerShellWindow.exclusionZone : 0
// 修改后(空行无尾随空格):
readonly property int dockReservedZone: DesktopIntegration.isTreeLand() ? Panel.rootObject.DLayerShellWindow.exclusionZone : 0
📋 评分汇总
📝 审查结论本次 PR 修复了 代码变更范围小(4 行新增,1 行删除),风险可控。OCR 专业代码审查工具未发现任何问题。建议合并前处理尾随空格和补充属性注释。 本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, wjyrich 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 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Log: Fixed dock reserved space calculation for launcher panel
Influence:
docs: 修复启动器面板 dock 尺寸计算问题
Log: 修复启动器面板的 dock 预留空间计算
Influence:
PMS: TASK-395113
Summary by Sourcery
Fix launcher panel sizing around docks by calculating exclusion space from the actual reserved dock zone.
Bug Fixes:
Enhancements: