Skip to content

Conversation

@18202781743
Copy link
Contributor

@18202781743 18202781743 commented Oct 29, 2025

Removed Layout.leftMargin: 2 from the title bar icon element. This
margin was causing misalignment in the title bar layout and was
determined to be unnecessary for proper visual spacing. The icon now
aligns correctly without this extra margin, improving the overall layout
consistency.

Influence:

  1. Verify title bar icon alignment in different window states
  2. Check layout consistency across various title bar configurations
  3. Test with different icon sizes and presence/absence of title text
  4. Ensure no visual regression in title bar appearance

fix: 移除标题栏图标不必要的左边距

从标题栏图标元素中移除了 Layout.leftMargin: 2。这个边距导致标题栏布局出
现错位,经确定对于正确的视觉间距是不必要的。现在图标在没有这个额外边距的
情况下能够正确对齐,提高了整体布局的一致性。

Influence:

  1. 在不同窗口状态下验证标题栏图标对齐
  2. 检查各种标题栏配置下的布局一致性
  3. 测试不同图标大小和标题文本存在/不存在的情况
  4. 确保标题栏外观没有视觉回归

PMS: BUG-335495

Summary by Sourcery

Bug Fixes:

  • Remove unnecessary left margin from title bar icon to fix misalignment

Removed Layout.leftMargin: 2 from the title bar icon element. This
margin was causing misalignment in the title bar layout and was
determined to be unnecessary for proper visual spacing. The icon now
aligns correctly without this extra margin, improving the overall layout
consistency.

Influence:
1. Verify title bar icon alignment in different window states
2. Check layout consistency across various title bar configurations
3. Test with different icon sizes and presence/absence of title text
4. Ensure no visual regression in title bar appearance

fix: 移除标题栏图标不必要的左边距

从标题栏图标元素中移除了 Layout.leftMargin: 2。这个边距导致标题栏布局出
现错位,经确定对于正确的视觉间距是不必要的。现在图标在没有这个额外边距的
情况下能够正确对齐,提高了整体布局的一致性。

Influence:
1. 在不同窗口状态下验证标题栏图标对齐
2. 检查各种标题栏配置下的布局一致性
3. 测试不同图标大小和标题文本存在/不存在的情况
4. 确保标题栏外观没有视觉回归

PMS: BUG-335495
@18202781743 18202781743 requested review from BLumia and mhduiy October 29, 2025 07:55
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Oct 29, 2025
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#546
@sourcery-ai
Copy link

sourcery-ai bot commented Oct 29, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR removes an unnecessary left margin on the title bar icon by deleting the Layout.leftMargin: 2 property in TitleBar.qml, ensuring the icon aligns correctly without extra spacing across different window and layout configurations.

File-Level Changes

Change Details Files
Eliminate manual left margin on title bar icon
  • Deleted the Layout.leftMargin: 2 line under the icon element
qt6/src/qml/TitleBar.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

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - 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
Contributor

deepin pr auto review

我来对这个git diff进行代码审查:

  1. 修改内容分析:
  • 移除了 Layout.leftMargin: 2 这一行属性设置
  • 其他代码保持不变
  1. 改进建议:

a) 布局一致性:

  • 移除左边距可能会导致界面布局不一致,建议确保其他相关组件也做了相应调整
  • 如果是为了统一边距,建议检查整个TitleBar组件的边距设置是否保持一致

b) 代码可维护性:

  • 建议在注释中说明移除左边距的原因,这样其他开发者能更容易理解这个改动
  • 如果这个改动是为了修复某个特定的布局问题,建议在commit message中详细说明

c) 视觉效果:

  • 移除2像素的左边距可能会影响视觉对齐,建议在不同分辨率和缩放比例下测试显示效果
  • 确保这个改动不会导致图标与窗口边缘过于贴近,影响美观性

d) 潜在风险:

  • 这个改动可能会影响其他依赖此组件的界面布局
  • 建议进行全面的回归测试,确保没有破坏现有的UI布局
  1. 建议:
  • 如果确实需要移除这个边距,建议通过全局样式变量来控制,而不是直接硬编码删除
  • 考虑使用DS.Style中定义的边距常量,这样可以保持样式的一致性
  • 建议在代码审查时,让UI/UX设计师也参与确认这个改动

总的来说,这个改动本身很简单,但可能会对界面布局产生连锁影响,建议谨慎处理并做好充分的测试。

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, mhduiy

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

@18202781743 18202781743 merged commit 3dcaff3 into linuxdeepin:master Oct 29, 2025
20 of 21 checks passed
18202781743 pushed a commit to linuxdeepin/dtk6declarative that referenced this pull request Oct 29, 2025
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#546
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.

3 participants