Skip to content

style: refine dock app item sizing and pressed state - #1718

Open
wjyrich wants to merge 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-375517
Open

style: refine dock app item sizing and pressed state#1718
wjyrich wants to merge 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-375517

Conversation

@wjyrich

@wjyrich wjyrich commented Aug 31, 2026

Copy link
Copy Markdown
Contributor
  1. Fix AppItem Control sizing to properly align with hover background
  2. Use explicit width/height properties instead of anchors.fill
  3. Center AppItem within parent for consistent positioning
  4. Adjust icon container left margin based on hover background spacing in title active state
  5. Add pressed state visual feedback with semi-transparent white background

Log: Refined dock app item layout and added pressed state visual effect

Influence:

  1. Verify dock app items display correctly in both title and icon-only modes
  2. Test icon alignment with hover background spacing
  3. Verify pressed state visual feedback appears when clicking app items
  4. Test app item sizing across different dock positions and orientations
  5. Verify drag and drop functionality remains unaffected

style: 优化 Dock 应用项目尺寸和按压状态

  1. 修复 AppItem Control 尺寸以正确对齐悬停背景
  2. 使用显式的宽高属性替代 anchors.fill
  3. 将 AppItem 居中于父级,保持定位一致
  4. 根据悬停背景间距调整标题激活状态下的图标容器左边距
  5. 添加按压状态的视觉反馈,使用半透明白色背景

Log: 优化 Dock 应用项目布局并添加按压状态视觉效果

Influence:

  1. 验证 Dock 应用项目在标题模式和图标模式下均正常显示
  2. 测试图标与悬停背景间距的对齐效果
  3. 验证点击应用项目时按压状态的视觉反馈
  4. 测试应用项目在不同 Dock 位置和方向下的尺寸表现
  5. 验证拖拽功能不受影响

PMS: BUG-375517 BUG-375531

Summary by Sourcery

Refine dock app item layout and interaction feedback for consistent alignment and clearer pressed states.

Bug Fixes:

  • Correct AppItem sizing and positioning so dock items align consistently with their hover backgrounds across layouts.

Enhancements:

  • Refine title-mode icon spacing and add visual feedback for pressed app items.

1. Fix AppItem Control sizing to properly align with hover background
2. Use explicit width/height properties instead of anchors.fill
3. Center AppItem within parent for consistent positioning
4. Adjust icon container left margin based on hover background spacing
in title active state
5. Add pressed state visual feedback with semi-transparent white
background

Log: Refined dock app item layout and added pressed state visual effect

Influence:
1. Verify dock app items display correctly in both title and icon-only
modes
2. Test icon alignment with hover background spacing
3. Verify pressed state visual feedback appears when clicking app items
4. Test app item sizing across different dock positions and orientations
5. Verify drag and drop functionality remains unaffected

style: 优化 Dock 应用项目尺寸和按压状态

1. 修复 AppItem Control 尺寸以正确对齐悬停背景
2. 使用显式的宽高属性替代 anchors.fill
3. 将 AppItem 居中于父级,保持定位一致
4. 根据悬停背景间距调整标题激活状态下的图标容器左边距
5. 添加按压状态的视觉反馈,使用半透明白色背景

Log: 优化 Dock 应用项目布局并添加按压状态视觉效果

Influence:
1. 验证 Dock 应用项目在标题模式和图标模式下均正常显示
2. 测试图标与悬停背景间距的对齐效果
3. 验证点击应用项目时按压状态的视觉反馈
4. 测试应用项目在不同 Dock 位置和方向下的尺寸表现
5. 验证拖拽功能不受影响

PMS: BUG-375517 BUG-375531
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wjyrich

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refines dock app item sizing, centering, and title-mode icon spacing to match hover backgrounds, and adds semi-transparent pressed-state feedback while keeping existing hover and drag behavior paths intact.

State diagram for dock app item background feedback

stateDiagram-v2
    [*] --> normal
    normal --> hovered : pointer hover
    hovered --> pressed : pointer press
    pressed --> hovered : pointer release
    hovered --> normal : pointer exit
    normal --> pressed : pointer press
    pressed --> normal : pointer release outside
Loading

File-Level Changes

Change Details Files
Refine AppItem geometry and positioning to align the control with its hover background across dock layouts.
  • Replace parent-filling anchors with layout-dependent explicit width and height.
  • Center the control within its parent while preserving title-mode implicit sizing.
  • Adjust the icon container’s left margin when the title-active state is applied.
panels/dock/taskmanager/package/AppItem.qml
Add pressed-state background feedback for dock app interactions.
  • Define semi-transparent white styling for both regular and dark pressed states.
  • Retain the existing hover styling alongside the new pressed appearance.
panels/dock/taskmanager/package/AppItemBackground.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 98 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次提交为 dock 任务栏应用图标的样式优化,修改了 AppItem 的尺寸布局逻辑并添加了按下状态的视觉反馈。代码改动简洁聚焦,语法正确,逻辑清晰,未发现安全漏洞。建议补充少量注释说明布局切换逻辑的设计意图。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


2. 代码质量 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: ['建议在 width/height 属性上方添加简短注释,说明水平/垂直布局下的尺寸策略']


3. 代码性能 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: []


💡 改进建议代码示例


本报告由 AI 代码审查工具自动生成

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants