Skip to content

fix: 修复深色模式下启动器文字颜色不反色 - #828

Merged
deepin-bot[bot] merged 1 commit into
masterfrom
agent/bot/fea04f6d0655
Oct 21, 2026
Merged

deepin-bot[bot] merged 1 commit into
masterfrom
agent/bot/fea04f6d0655

Conversation

@wjyrich

@wjyrich wjyrich commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Root Cause

In dark mode, all text in the launcher appears black because the windowed mode launcher (windowedModeLauncher Window block in launcheritem.qml) does not set DWindow.themeType. Without this, the DTK window is unaware of the system dark theme, so text colors don't invert.

The fullscreen mode launcher already sets DWindow.themeType (line 230), but the windowed mode was missing this setting.

Fix

Added DWindow.themeType: D.DTK.themeType after color: "transparent" in the windowedModeLauncher Window block. This makes the windowed launcher follow the system theme type, so text colors invert correctly in dark mode.

Both DWindow and D imports already exist in the file, so no additional imports are needed.

Related

Summary by Sourcery

Bug Fixes:

  • Ensure the windowed launcher follows the system theme so text colors display correctly in dark mode.

@wjyrich
wjyrich marked this pull request as draft October 21, 2026 03:40
@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026 •

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

Reviewer's Guide

The launcher’s windowed-mode QML window now binds DWindow.themeType to the system DTK theme, aligning its text colors with dark mode; fullscreen behavior and imports remain unchanged.

File-Level Changes

Change Details Files
Propagate the system theme type to the windowed launcher window so DTK can apply dark-mode text colors.
  • Set the windowed launcher’s DWindow themeType from D.DTK.themeType.
  • Reuse existing DWindow and D imports without changing dependencies.
shell-launcher-applet/package/launcheritem.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 ✨

1. Add DWindow.themeType: D.DTK.themeType to windowedModeLauncher Window
2. Fix dark mode text color not inverting in windowed launcher mode
3. Fullscreen mode already had themeType set, windowed mode was missing

Log: Windowed launcher now follows system dark/light theme

Influence:
1. Test launcher text color in dark mode (windowed mode)
2. Test launcher text color in light mode (windowed mode)
3. Verify theme switches correctly when toggling system theme

fix: 设置窗口模式启动器的 DWindow 主题类型

1. 在 windowedModeLauncher Window 中添加 DWindow.themeType: D.DTK.themeType
2. 修复深色模式下窗口模式启动器文字颜色不反色的问题
3. 全屏模式已设置 themeType,窗口模式之前遗漏

Log: 窗口模式启动器现在跟随系统深色/浅色主题

Influence:
1. 测试深色模式下启动器文字颜色(窗口模式)
2. 测试浅色模式下启动器文字颜色(窗口模式)
3. 验证切换系统主题时文字颜色正确切换

PMS: BUG-380337
@wjyrich
wjyrich force-pushed the agent/bot/fea04f6d0655 branch from 788e216 to 15e7456 Compare October 21, 2026 03:44
@wjyrich
wjyrich marked this pull request as ready for review October 21, 2026 06:25

@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 ✨

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

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

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次提交为单行修复,通过在 launcheritem.qml 中添加 DWindow.themeType: D.DTK.themeType 属性绑定, 使启动器窗口主题类型跟随 DTK 平台主题,修复深色模式下文字颜色不反色的问题。 四维度分析均无问题,无安全漏洞,代码改动最小化且逻辑正确。

🔍 详细分析

1. 语法逻辑 ✅

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

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

建议: []


2. 代码质量 ✅

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

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

建议: []


3. 代码性能 ✅

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

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

建议: []


4. 代码安全 🔒

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

🔐 发现 0 个安全漏洞

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

建议: []


💡 改进建议代码示例

// 当前修复已正确,无需额外修改。 // DWindow.themeType: D.DTK.themeType 已正确绑定窗口主题到 DTK 平台主题。

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

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, 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 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit 5530a6f into master Oct 21, 2026
9 of 10 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