Skip to content

fix: honor uninstall dialog width constraint - #850

Merged
wjyrich merged 1 commit into
linuxdeepin:release/2500u2from
robertkill:fix/bug-383057-uninstall-dialog-width-2500u2
Nov 13, 2026
Merged

wjyrich merged 1 commit into
linuxdeepin:release/2500u2from
robertkill:fix/bug-383057-uninstall-dialog-width-2500u2

Conversation

@robertkill

@robertkill robertkill commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

修改

基于 release/2500u2 的 6f9a86d4b073753895182d747453c3d0bdc6455c,仅为共用卸载确认框增加:

width: minimumWidth

保留该分支已有的 Component.onCompleted layer-shell 初始化,不携带 master 的主题、图标测试或其它变更;不改卸载、取消逻辑及公共 DTK。

原因与适用范围

此 PR 替代原面向 master 的 #848,交付目标为 2500u2。

旧 DTK 6.7.52-1 下,启动器已设 minimumWidth/maximumWidth,但对话框实际宽度仍会塌缩。此行让实际宽度遵守业务已有的固定宽度约束。

DTK PR #745 的布局改动已包含在 6.7.53;同环境源码几何对照显示新实现无需此行也能达到预期宽度。因此这是兼容旧 DTK 的发布分支修复,不宣称最新 DTK 仍存在该缺陷。

实际验证

  • 从主 checkout 完整构建该 release 基线及最终单行改动,Qt 6.8 / amd64。
  • 在 10.20.9.14 的 Treeland 真实桌面临时安装 libdtk6declarative 6.7.52-1,其余 DTK core/gui 保持 6.7.53.0,dde-shell 保持 2.0.61.4;实际映射 SHA-256 与安装产物一致。
  • 同机同路径:release 未修复版本显示中央窄条 → 仅加 width 绑定后文字、取消/确定按钮完整显示。
  • 修复版窗口模式取消、重开正常;全屏模式确认框完整居中、取消正常。
  • 15 个现有 CTest 目标全部执行:修复与未修基线均为 14 通过、1 失败;相同失败是 searchfilterproxymodeltest::testSharedModelAdapter,第 322 行 desktopId 映射断言。没有修改断言、跳过测试或夹带搜索修复。
  • 变更行 QML 静态检查及 git diff --check 通过。
  • 结束恢复机器原来的 dde-launchpad 2.0.52.3、libdtk6declarative 6.7.53.1、窗口模式和桌面现场;包校验、实际映射内容及 dpkg audit 正常。

未覆盖

未点击最终“确定”,没有实际卸载软件;未覆盖多屏混合缩放、长应用名/大字体、其它架构或全套旧 DTK core/gui。仅 declarative 降到旧版的组合已明确,不把它称为全套 6.7.52 环境。

Log: keep uninstall confirmation at its existing fixed width
PMS: BUG-383057

Summary by Sourcery

Bug Fixes:

  • Ensure the uninstall confirmation dialog honors its existing minimum and fixed width constraint on older DTK versions.

1. Bind the confirmation window width to its existing minimumWidth.
2. Preserve the fixed-width policy, layer-shell initialization and
   uninstall/cancel behavior; do not change public DTK components.

Influence:
1. Verify uninstall confirmation display, cancel and reopen in Treeland.
2. Check the shared dialog in windowed and fullscreen launcher modes.

fix: 卸载确认框实际宽度遵循已有尺寸约束

1. 将确认窗口的实际宽度绑定到现有 minimumWidth。
2. 保留固定宽度策略、layer-shell 初始化及卸载/取消行为,不修改公共 DTK 组件。

Influence:
1. 验证 Treeland 下卸载确认框显示、取消和重开。
2. 检查窗口与全屏启动器模式共用的确认框。

Log: keep uninstall confirmation at its existing fixed width
PMS: BUG-383057
@sourcery-ai

sourcery-ai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Reviewer's Guide

UI

Bind the uninstall confirmation window’s actual width to its existing minimumWidth so it honors the fixed-width constraint.

  • shell-launcher-applet/package/launcheritem.qml L399

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 found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="shell-launcher-applet/package/launcheritem.qml" line_range="399" />
<code_context>
             DLayerShellWindow.anchors = DLayerShellWindow.AnchorNone
         }

+        width: minimumWidth
         minimumWidth: layout.implicitWidth + 2 * DStyle.Style.dialogWindow.contentHMargin
         minimumHeight: layout.implicitHeight + DStyle.Style.dialogWindow.titleBarHeight
</code_context>
<issue_to_address>
**Uninstall confirmation stays collapsed**

When the uninstall confirmation is opened from the launchpad on an older DTK, `qml/Main.qml`'s uninstall confirmation sets only `minimumWidth` and `maximumWidth`, so the window remains collapsed and clips its text and buttons.

Bind the uninstall confirmation's `width` to `minimumWidth` in `qml/Main.qml`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

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

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次提交修复了卸载对话框宽度约束未生效的问题,新增 width: minimumWidth 绑定确保对话框实际宽度遵循最小宽度约束。 语法正确、逻辑清晰,代码改动极小且聚焦,无安全漏洞,无性能问题,四维度均通过。

🔍 详细分析

1. 语法逻辑 ✅

评价: 语法正确,逻辑清晰 ✅ 通过

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

建议: 无


2. 代码质量 ✅

评价: 代码结构清晰,注释完整 ✅ 通过

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

建议: 无


3. 代码性能 ✅

评价: 性能良好,资源使用合理 ✅ 通过

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

建议: 无


4. 代码安全 🔒

评价: 存在0个安全漏洞 ✅ 通过

🔐 发现 0 个安全漏洞

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

建议: 无


💡 改进建议代码示例

// 当前修复已正确,无需额外改进 // width: minimumWidth 确保对话框宽度遵循最小宽度约束

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

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: robertkill, 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

@wjyrich
wjyrich merged commit 6b06ba0 into linuxdeepin:release/2500u2 Nov 13, 2026
9 checks passed
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