Skip to content

style(stream-menu): improve readability across system themes - #81

Merged
qiin2333 merged 1 commit into
masterfrom
codex/improve-stream-menu-contrast
Jul 25, 2026
Merged

style(stream-menu): improve readability across system themes#81
qiin2333 merged 1 commit into
masterfrom
codex/improve-stream-menu-contrast

Conversation

@qiin2333

@qiin2333 qiin2333 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

改了啥呀

  • 把串流菜单配色整理成 StreamMenuColors 语义资源,通过 base/dark 资源限定自动跟随系统主题
  • 为遮罩、玻璃表面、文字、控件、滑轨、选中态和马卡龙按钮补齐成对配色,浅色串流画面再亮也不会把菜单变成看不清的杂鱼状态
  • 修正“更多设置”、同色胶囊、皇冠图标、任意快捷键颜色与拖拽态的对比度边界
  • 将毛玻璃半径从 40 降到 20,并收敛阴影参数,控制额外合成开销

为啥要改

原先菜单主要依赖白色半透明文字和卡片,遇到亮白或 HDR 串流内容时对比度会明显下降。组件内手动判断主题还会让颜色逻辑分散,维护起来也很杂鱼。

这次把主题差异留在资源层,组件只消费语义色:既保留马卡龙和玻璃质感,也让系统浅色、深色主题各自拥有稳定可读的前景与表面组合。

验证

  • npm run check
  • DEVECO_SDK_HOME=/Applications/DevEco-Studio.app/Contents/sdk node hvigorw.js default@CompileArkTS --mode module -p module=entry@default -p product=default -p buildMode=debug --no-daemon
  • jq empty entry/src/main/resources/base/element/color.json
  • jq empty entry/src/main/resources/dark/element/color.json
  • git diff --check
  • 对比度复核:静态文字最低 Base 4.722:1、Dark 5.009:1;图形/控件最低 Base 3.405:1、Dark 3.185:1

当前 HDC 无连接设备,尚未完成真机串流画面和菜单打开时系统主题热切换的视觉验收。

Summary by CodeRabbit

  • 新功能

    • 串流游戏菜单新增统一的主题配色,支持浅色与深色模式自动适配。
    • 优化菜单背景、文字、边框、按钮、滑块、开关及选中状态的视觉表现。
    • 新增多种强调色、状态色和控件配色,提升界面层次与可读性。
  • 样式

    • 调整覆盖层毛玻璃效果,使菜单整体显示更加清晰。

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2510f5a3-d468-4aeb-8b36-30c1792fa0b7

📥 Commits

Reviewing files that changed from the base of the PR and between eda5981 and 2c485e2.

📒 Files selected for processing (4)
  • entry/src/main/ets/common/OverlayConstants.ets
  • entry/src/main/ets/components/dialogs/GameMenuDialog.ets
  • entry/src/main/resources/base/element/color.json
  • entry/src/main/resources/dark/element/color.json

📝 Walkthrough

Walkthrough

新增串流菜单语义颜色资源及统一映射,将游戏菜单各区域迁移到新颜色体系,并把覆盖层标准模糊度从 40 调整为 20。

Changes

串流菜单主题与界面样式

Layer / File(s) Summary
颜色资源与共享样式契约
entry/src/main/ets/common/OverlayConstants.ets, entry/src/main/ets/components/dialogs/GameMenuDialog.ets, entry/src/main/resources/*/element/color.json
新增 base/dark 主题颜色资源和 StreamMenuColors,移除菜单深浅主题判断,调整卡片模糊度及通用样式。
菜单基础控件与手柄设置
entry/src/main/ets/components/dialogs/GameMenuDialog.ets
菜单遮罩、按钮、自定义按键、画面缩放和虚拟手柄区域改用统一语义颜色。
音频振动设置
entry/src/main/ets/components/dialogs/GameMenuDialog.ets
音频振动卡片、场景按钮、强度 Slider 及展开区域迁移到新颜色体系。
码率、体感助手与快捷键控件
entry/src/main/ets/components/dialogs/GameMenuDialog.ets
码率、体感助手、服务端指令、快捷键卡片及 Pill 控件使用新的文本、强调、成功、表面和阴影颜色。

Estimated code review effort: 4 (Complex) | ~45 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了通过主题语义色提升串流菜单在系统主题下可读性的主要改动。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/improve-stream-menu-contrast

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qiin2333
qiin2333 merged commit cebc729 into master Jul 25, 2026
2 checks passed
@qiin2333
qiin2333 deleted the codex/improve-stream-menu-contrast branch July 25, 2026 11:08
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.

1 participant