Skip to content

Add Equal Brightness Support for Displays - #1924

Open
qingye0312-cpu wants to merge 17 commits into
MonitorControl:mainfrom
qingye0312-cpu:pr/equal-brightness-support
Open

qingye0312-cpu wants to merge 17 commits into
MonitorControl:mainfrom
qingye0312-cpu:pr/equal-brightness-support

Conversation

@qingye0312-cpu

@qingye0312-cpu qingye0312-cpu commented Oct 5, 2026 •

Copy link
Copy Markdown

This PR adds a standalone, localized equal-brightness calibration editor for multiple displays. It provides one aligned live slider per display, keeps display colors consistent across the graph and controls, and applies calibration changes immediately while the user works with reference points.

Changes / 变更

  • Standalone calibration page: Rebuilds the equal-brightness editor as an independent AppKit page with explicit, function-oriented layout components.
  • Aligned live sliders: Creates one continuously updating slider for every connected display. Dragging a slider immediately changes that physical display's brightness.
  • Per-display colors: Uses blue for the reference display and a distinct stable color for each target display. The target curve, reference points, and slider use the same color.
  • Reference-point guides: Draws a gray vertical guide for every reference point. Clicking a guide selects the point, moves all sliders to the corresponding values, applies the brightness changes, and refreshes the full curve preview.
  • Curve editing: Supports piecewise-linear and smooth monotone-cubic previews, independent target-display calibration, adding reference points, removing editable points, and saving or cancelling the current session.
  • Bilingual guidance: Replaces the usage section with localized Chinese and English instructions. The guidance uses the same typography and color as the point summary and is separated from it by one blank line.
  • Bilingual code comments: Documents the new layout, interaction, color, and calibration behavior in Chinese and English.

Testing / 测试

  • Release build with code signing disabled: passed.
  • Swift syntax parse for EqualBrightnessSettingsViewController.swift: passed.
  • plutil -lint for both localizations and bundle property lists: passed.
  • git diff --check: passed.
  • The generated app is unsigned and located at build/DerivedData/Build/Products/Release/MonitorControl.app.
  • Brightness mapping and physical multi-display interaction: verified successfully on hardware.

中文说明

本 PR 新增了一个独立的多显示器等亮度校准页面。页面为每台显示器提供对齐的实时滑块,统一图表与控件中的显示器颜色,并在编辑参考点时立即应用亮度变化。

变更内容

  • 独立校准页面: 使用独立的 AppKit 页面重写等亮度编辑器,并将布局拆分为多个功能组件。
  • 对齐的实时滑块: 每台已连接显示器对应一个连续更新的滑块,拖动时会立即修改实际显示器亮度。
  • 每台显示器独立颜色: 参考显示器使用蓝色,每台目标显示器使用稳定且不同的颜色;目标曲线、参考点和对应滑块保持同色。
  • 参考点引导线: 每个参考点绘制一条灰色纵向引导线。点击引导线后,会选中该点、移动所有滑块、应用对应亮度,并刷新整条曲线预览。
  • 曲线编辑: 支持分段线性和平滑单调曲线预览,可分别校准不同目标显示器,并支持添加参考点、删除可编辑点、保存或取消当前会话。
  • 双语使用说明: 整体替换为中文和英文本地化说明,使用与参考点摘要相同的字体和颜色,并在摘要与说明之间保留一个空行。
  • 双语代码注释: 为新增的布局、交互、颜色和校准逻辑补充中英双语注释。

测试结果

  • Release 构建(关闭代码签名):通过。
  • EqualBrightnessSettingsViewController.swift Swift 语法解析:通过。
  • 中英文本地化文件及 bundle plist 的 plutil -lint:通过。
  • git diff --check:通过。
  • 生成的未签名应用位于 build/DerivedData/Build/Products/Release/MonitorControl.app。
  • 亮度映射及多显示器实体机交互:已完成实体机验证,结果正常。

@qingye0312-cpu

Copy link
Copy Markdown
Author

@Blizzeq Hello, PR #1924 now includes the equal-brightness feature and full localization support. Please review it when convenient. If everything looks good, you can merge it directly.

@Blizzeq

Blizzeq commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Hi, thanks for the ping, but I'm not a maintainer here and can't merge anything. I only contributed the Polish translation; waydabber is the one who reviews and merges.

I did look at the Polish strings, since that is the part I can judge:

  • The existing Polish translation says "wyświetlacz" for display. The new strings mix it with "ekran" ("Ekran docelowy", and "ekran" throughout the instructions). I'd use "wyświetlacz" everywhere.
  • "Mac Reference" as "Referencja Mac" reads oddly. "Mac (odniesienie)" would be more natural.
  • en.lproj/Main.strings adds the K2x-9V-dsR.title entry twice.

I haven't reviewed the Swift code.

@qingye0312-cpu

qingye0312-cpu commented Oct 14, 2026 •

Copy link
Copy Markdown
Author

Hi, thank you very much for taking the time to review the translation and point out these issues.
I apologize for contacting the wrong person. I’m still a beginner contributor and wasn’t very familiar with the maintainer/reviewer workflow, so I mistakenly reached out to you. Sorry for the confusion.
I really appreciate your detailed feedback on the Polish strings. I’ll update the translation accordingly:

  • use "wyświetlacz" consistently instead of mixing it with "ekran";
  • revise "Referencja Mac" to a more natural expression;
  • remove the duplicated K2x-9V-dsR.title entry in en.lproj/Main.strings.

I’ll make these changes shortly and submit the update. Thanks again for your help and guidance!

@qingye0312-cpu

Copy link
Copy Markdown
Author

@waydabber Hello, PR #1924 now includes the equal-brightness feature and full localization support. Please review it when convenient. If everything looks good, you can merge it directly.

@waydabber

Copy link
Copy Markdown
Member

Hi @qingye0312-cpu - thanks for the contribution. I am adding a "fork recommendation" tag to this for discoverability, but since MonitorControl is feature locked and mostly in a compatibility-maintenance status, I do not plan to add new features to the app itself. But users who need this feature in the app can follow to your fork through here - you are free to maintain the fork, provide notarized builds or even rename and create a derived product like "EqualizedMonitorControl" for example.

Let me know if you have any questions regarding this!

@waydabber waydabber added the AI contribution / fork recommendation Unplanned PR (typically AI) with improvements which may be of interest to the community label Oct 14, 2026

This branch has not been deployed

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

Labels

AI contribution / fork recommendation Unplanned PR (typically AI) with improvements which may be of interest to the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants