Skip to content

Revert "fix(display): adjust default manual color temperature"#1137

Merged
fly602 merged 1 commit into
linuxdeepin:masterfrom
fly602:master
Jun 4, 2026
Merged

Revert "fix(display): adjust default manual color temperature"#1137
fly602 merged 1 commit into
linuxdeepin:masterfrom
fly602:master

Conversation

@fly602

@fly602 fly602 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

This reverts commit 8184e7d.

Summary by Sourcery

Bug Fixes:

  • Restore the prior default manual color temperature behavior in the display configuration to undo an unintended change.

@sourcery-ai

sourcery-ai Bot commented Jun 4, 2026

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

Reviewer's Guide

Reverts a previous change to the default manual color temperature configuration in the display settings JSON, restoring the prior configuration values.

File-Level Changes

Change Details Files
Restore the previous display default manual color temperature configuration.
  • Revert the earlier modification that adjusted default manual color temperature values in the display configuration
  • Return the display configuration JSON content to its state prior to commit 8184e7d
misc/dsg-configs/org.deepin.Display.json

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

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

你好!我是你的智能编程助手 CodeGeeX。我已仔细审查了你提供的 Git Diff 内容。

这次的修改非常简单,仅将配置文件 org.deepin.Display.json 中的 defaultTemperatureManual(手动默认色温)的值从 6500 修改为了 3500

以下是我对这次修改在各个维度上的审查意见:

1. 语法逻辑

  • 语法:JSON 语法完全正确,没有遗漏逗号、引号不匹配等问题。
  • 逻辑:从逻辑上看,这只是一个默认值的调整。6500K 通常代表标准的日光/白昼色温,而 3500K 属于典型的暖色/夜间色温。将默认值调低,意味着用户首次开启手动色温调节时,屏幕会默认呈现较暖的色调。

2. 代码质量

  • 可读性与可维护性:修改符合 JSON 配置文件的规范,结构清晰。
  • 建议:虽然 JSON 格式不支持注释,但建议在提交 Commit Message 时,务必详细说明将默认色温从 6500K 降至 3500K 的业务原因。因为 3500K 作为默认色温偏暖,可能会让习惯冷屏的用户感到不适,清晰的提交记录有助于未来追溯设计决策。

3. 代码性能

  • 无影响:这是一个静态配置文件的数据变更,仅在程序初始化或读取该配置项时加载一次,对程序运行时的性能没有任何负面影响。

4. 代码安全与潜在风险(重点关注)

虽然不是传统的代码安全漏洞,但这个修改涉及到用户体验和硬件显示,有几个关键风险需要确认:

  • 用户体验风险:3500K 的色温非常黄/暖。如果这是面向所有用户的全新默认值,可能会让大部分习惯 6500K 标准冷白屏的用户在首次使用时感到极度不适,甚至误以为屏幕显色不准或显示器故障。
  • 逻辑关联风险:需要确认代码逻辑中,这个“默认值”是在什么场景下被使用的?
    • 如果是夜间模式/护眼模式的默认值,3500K 是合理的。
    • 如果是普通手动调节模式的初始值,3500K 极其不合理,建议保持在 6500K 或中性色温(如 5000K-5500K)。
    • 是否有关联的 UI 代码(如 QML/滑块)的 minmax 值需要同步调整?如果滑块的默认位置是根据这个值计算的,需确保 UI 显示同步更新,否则会出现“滑块在中间,但实际值是 3500”的错位问题。

💡 改进建议

  1. 确认业务场景:请再次确认 3500K 作为全局默认值是否符合产品需求。通常建议默认色温保持在中性(如 6500K),而 3500K 作为“夜间模式”开启后的默认值。
  2. 代码联动测试:确保读取此 JSON 的 C++/Qml 代码能正确解析 3500 这个数值,且对应的 UI 滑块(如果有)的初始状态能与之匹配。
  3. Commit 规范:建议 Commit Message 示例:feat(display): adjust default manual temperature to 3500K for eye protection in night mode,把修改意图写清楚。

总体而言,代码修改本身无误,核心风险在于业务逻辑和用户体验,请结合实际产品需求评估此默认值是否恰当。

@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

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@fly602 fly602 merged commit 3a6fc43 into linuxdeepin:master Jun 4, 2026
16 of 18 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