Skip to content

🐛 修复 ScriptEditor 脚本列表硬编码暗色背景#1288

Merged
CodFrm merged 2 commits intorelease/v1.4from
worktree-fix-editor-dark-colors
Mar 17, 2026
Merged

🐛 修复 ScriptEditor 脚本列表硬编码暗色背景#1288
CodFrm merged 2 commits intorelease/v1.4from
worktree-fix-editor-dark-colors

Conversation

@CodFrm
Copy link
Member

@CodFrm CodFrm commented Mar 16, 2026

Summary

  • [v1.4] 优化 ScriptEditor #1258 中引入了硬编码的暗色 hex 值(#414958/#474747/#333333)和 RGB 文字颜色,导致脚本列表在亮色模式下也显示为暗色背景
  • 改用 Arco Design CSS 变量(--color-fill-2, --color-text-2, --color-text-3, --warning-6),使脚本列表在亮色/暗色模式下都能正确显示
  • opacity 替代手动计算 RGBA alpha,简化逻辑

Test plan

  • 亮色模式下打开脚本编辑器,确认脚本列表背景为正常亮色
  • 暗色模式下打开脚本编辑器,确认脚本列表背景为正常暗色
  • 选中脚本时背景高亮正确
  • 已修改脚本显示黄色文字
  • 禁用脚本显示半透明效果

#1258 中引入了硬编码的暗色 hex 值(#414958/#474747/#333333)和 RGB 文字颜色,
导致脚本列表在亮色模式下也显示为暗色背景。

改用 Arco Design CSS 变量(--color-fill-2, --color-text-2 等),使脚本列表
在亮色/暗色模式下都能正确显示。
@cyfung1031
Copy link
Collaborator

你确认那些颜色辨别度足够就行了 ( 我不看了 )
不然就自定色

.dark 用
#414958 / #474747 / #333333
正常用其他

@CodFrm
Copy link
Member Author

CodFrm commented Mar 16, 2026

你确认那些颜色辨别度足够就行了 ( 我不看了 ) 不然就自定色

.dark 用 #414958 / #474747 / #333333 正常用其他

最好还是变量了

@cyfung1031
Copy link
Collaborator

cyfung1031 commented Mar 16, 2026

你确认那些颜色辨别度足够就行了 ( 我不看了 ) 不然就自定色
.dark 用 #414958 / #474747 / #333333 正常用其他

最好还是变量了

xxx {
--editor-color-1: #xxxxxx;
--editor-color-2: #xxxxxx;
--editor-color-3: #xxxxxx;
}
.dark xxx {
--editor-color-1: #414958;
--editor-color-2: #474747;
--editor-color-3: #333333;
}

(我忘了 dark 那個class還是attribute是放哪了。反正就是這個做法)

@CodFrm
Copy link
Member Author

CodFrm commented Mar 17, 2026

你确认那些颜色辨别度足够就行了 ( 我不看了 ) 不然就自定色
.dark 用 #414958 / #474747 / #333333 正常用其他

最好还是变量了

xxx {
--editor-color-1: #xxxxxx;
--editor-color-2: #xxxxxx;
--editor-color-3: #xxxxxx;
}
.dark xxx {
--editor-color-1: #414958;
--editor-color-2: #474747;
--editor-color-3: #333333;
}

(我忘了 dark 那個class還是attribute是放哪了。反正就是這個做法)

这样也行,不过我的想法是直接和arco的复用了

@CodFrm CodFrm merged commit a144ae3 into release/v1.4 Mar 17, 2026
2 of 3 checks passed
@CodFrm CodFrm deleted the worktree-fix-editor-dark-colors branch March 17, 2026 02:32
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.

2 participants