App.axaml comment claims the Simple theme has no Dark dictionary; audit dark-mode overrides

未关闭
#4,151 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp

调研方向

Start with the comment and theme dictionaries around lines 35-40 of ILSpy/App.axaml, then inspect Avalonia.Themes.Simple/Accents/Base.xaml for its Default and Dark entries. Audit the ILSpy.* overrides and Simple-themed controls that use the listed variant-independent keys. Done means the comment is accurate, unnecessary overrides are identified or removed, and dark-mode contrast issues like #4146 are addressed.

由索引模型根据 Issue 内容生成。

描述

Follow-up from #4150 (fix for #4146).

Stale comment

The comment above the theme dictionaries in ILSpy/App.axaml (around lines 35-40) says:

The Simple theme itself ships no Dark resource dictionary, so chrome painted by Simple (menu, scrollbars, tree, status bar) stays Light regardless of the user's theme choice. Intentional, partial dark mode targeting only the surfaces a reader spends most time looking at.

That is no longer true for the Avalonia version we are on (12.1.2). Avalonia.Themes.Simple/Accents/Base.xaml has ResourceDictionary.ThemeDictionaries with a Default and a Dark entry, and most Theme*Color / Theme*Brush keys vary between them (e.g. ThemeForegroundColor #FF000000 vs #FFDEDEDE, ThemeControlHighlightMidColor #FFD0D0D0 vs #FF828282).

What Simple does not vary per variant are the keys defined outside those dictionaries:

  • ThemeForegroundLowColor / ThemeForegroundLowBrush (#FF808080)
  • ThemeAccentColor, ThemeAccentColor2/3/4 and their brushes (#CC/99/66/33119EDA)

Those fixed keys are what caused #4146 (fixed #808080 text on the Dark #828282 hover fill).

To do
  • Rewrite the comment so it describes what Simple 12.1.2 actually provides and which keys stay fixed.
  • Audit which of our ILSpy.* overrides and restyles exist only because of the old assumption and could now lean on Simple's own Dark dictionary instead.
  • Audit other Simple-themed controls that use the variant-independent keys (ThemeForegroundLowBrush, ThemeAccentBrush*) for the same kind of dark-mode contrast problem as #4146.

Assisted-by: Claude:claude-fable-5-1:Claude Code

主要语言
C#
星标
26.8k
派生
3.8k
平均合并
1 天 2 小时
30 天内合并 PR
71

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

icsharpcode/ILSpy 的其他 Issue

查看 icsharpcode/ILSpy 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。