SessionSettings.Themeis loaded from session XML, defaulting toThemeManager.Current.DefaultTheme("Light").ProjectRover/src/ILSpy/ILSpy/SessionSettings.cs:58ProjectRover/src/ILSpy/ILSpy/Themes/ThemeManager.cs:50
- On app startup, ILSpy applies it with
ThemeManager.Current.Theme = sessionSettings.Theme.ProjectRover/src/ILSpy/ILSpy/App.xaml.cs:112
ThemeManager.UpdateTheme()loads/themes/Theme.{ThemeName}.xaml, merges it into app resources, and caches allSyntaxColor.*entries for syntax highlighting.ProjectRover/src/ILSpy/ILSpy/Themes/ThemeManager.cs:113ProjectRover/src/ILSpy/ILSpy/Themes/ThemeManager.cs:128ProjectRover/src/ILSpy/ILSpy/Themes/ThemeManager.cs:136
Theme can be changed at runtime from:
- View menu theme picker (
SetThemeCommandwritesSessionSettings.Theme)ProjectRover/src/ILSpy/ILSpy/Controls/MainMenu.xaml:25ProjectRover/src/ILSpy/ILSpy/Commands/SetThemeCommand.cs:14
- Options panel combo box (bound to
SessionSettings.Theme)ProjectRover/src/ILSpy/ILSpy/Options/DisplaySettingsPanel.xaml:14
ThemeManager listens for SessionSettings.Theme property changes and reapplies the theme dictionary:
ProjectRover/src/ILSpy/ILSpy/Themes/ThemeManager.cs:211
- Editor base brushes are dynamic resources in
DecompilerTextView.xaml:- Background:
themes:ResourceKeys.TextBackgroundBrush - Foreground:
themes:ResourceKeys.TextForegroundBrush - Line numbers:
themes:ResourceKeys.LineNumbersForegroundBrush ProjectRover/src/ILSpy/ILSpy/TextView/DecompilerTextView.xaml:35
- Background:
- These keys are defined in
Theme.*.xaml(and merged withBase.*.xaml):- Example light:
ProjectRover/src/ILSpy/ILSpy/Themes/Theme.Light.xaml:8 - Example dark:
ProjectRover/src/ILSpy/ILSpy/Themes/Theme.Dark.xaml:8
- Example light:
- Syntax highlighting definitions are registered in
DecompilerTextView.RegisterHighlighting().ProjectRover/src/ILSpy/ILSpy/TextView/DecompilerTextView.cs:1318
- While registering each
.xshd, ILSpy wraps definition creation withThemeManager.Current.ApplyHighlightingColors(highlightingDefinition).ProjectRover/src/ILSpy/ILSpy/TextView/DecompilerTextView.cs:1457
ApplyHighlightingColors()resets named colors and applies matchingSyntaxColor.<Language>.*entries from the current theme dictionary.ProjectRover/src/ILSpy/ILSpy/Themes/ThemeManager.cs:90ProjectRover/src/ILSpy/ILSpy/Themes/ThemeManager.cs:98
- Active language picks a highlighting definition by file extension (
Language.SyntaxHighlighting), and decompile output sets it on the editor (textEditor.SyntaxHighlighting = highlighting).ProjectRover/src/ILSpy/ILSpy/Languages/Language.cs:76ProjectRover/src/ILSpy/ILSpy/TextView/DecompilerTextView.cs:746
- AvalonEdit colorization uses
ThemeAwareHighlightingColorizer; for non-theme-aware definitions on dark themes, it auto-adjusts colors.ProjectRover/src/ILSpy/ILSpy/TextView/DecompilerTextEditor.cs:9ProjectRover/src/ILSpy/ILSpy/TextView/ThemeAwareHighlightingColorizer.cs:24
When theme changes, ILSpy forces re-register + redraw of decompiled output:
DecompilerTextView.RegisterHighlighting(); RefreshDecompiledView();ProjectRover/src/ILSpy/ILSpy/AssemblyTree/AssemblyTreeModel.cs:89
- On mouse hover,
DecompilerTextViewfinds the hovered reference segment and callsGenerateTooltip(...).ProjectRover/src/ILSpy/ILSpy/TextView/DecompilerTextView.cs:237ProjectRover/src/ILSpy/ILSpy/TextView/DecompilerTextView.cs:412
- For opcode/entity tooltips, ILSpy builds a
FlowDocumentviaDocumentationUIBuilder, passinglanguageService.Language.SyntaxHighlighting/currentLanguage.SyntaxHighlighting.ProjectRover/src/ILSpy/ILSpy/TextView/DecompilerTextView.cs:419ProjectRover/src/ILSpy/ILSpy/TextView/DecompilerTextView.cs:471
DocumentationUIBuilderuses that highlighting definition for signature/code blocks (DocumentHighlighter+ rich text runs).ProjectRover/src/ILSpy/ILSpy/TextView/DocumentationUIBuilder.cs:96ProjectRover/src/ILSpy/ILSpy/TextView/DocumentationUIBuilder.cs:110
- Popup chrome/text colors are
SystemColors-based:- Background:
SystemColors.ControlBrushKey - Border:
SystemColors.ControlDarkBrushKey - Foreground:
SystemColors.InfoTextBrushKey ProjectRover/src/ILSpy/ILSpy/TextView/DecompilerTextView.cs:523
- Background:
- Those
SystemColors.*resources are overridden by the active base theme dictionaries (Base.Light.xaml/Base.Dark.xaml), so popup container text/chrome follows current theme.ProjectRover/src/ILSpy/ILSpy/Themes/Base.Light.xaml:18ProjectRover/src/ILSpy/ILSpy/Themes/Base.Dark.xaml:18
- Decompiled editor colors come from:
ResourceKeysbrushes (background/foreground/etc.) fromTheme.*.xaml- Syntax token colors from
SyntaxColor.*entries applied throughThemeManager.ApplyHighlightingColors()
- Hover popup colors come from:
- Same language syntax highlighting for code/signatures inside the tooltip
SystemColors.*brushes for popup frame/text, which are overridden by the active base theme resources
- Rover still uses
SessionSettings.Themeand applies it at startup:ProjectRover/src/ProjectRover/App.axaml.cs:77ProjectRover/src/ProjectRover/App.axaml.cs:295
- Avalonia theme switching is centralized in
ThemeManagerShim(ThemeManagerin Rover), and it drivesRequestedThemeVarianton app/windows:ProjectRover/src/ProjectRover/Themes/ThemeManagerShim.cs:80ProjectRover/src/ProjectRover/Themes/ThemeManagerShim.cs:93ProjectRover/src/ProjectRover/Themes/ThemeManagerShim.cs:101
- Options panel and menu are wired to the same setting/theme manager:
ProjectRover/src/ProjectRover/Options/DisplaySettingsPanel.axaml:18ProjectRover/src/ProjectRover/Commands/ThemeCommands.cs:38ProjectRover/src/ProjectRover/Controls/MainMenu.axaml.cs:1403
- Highlighting registration flow is equivalent to WPF (
RegisterHighlighting+ApplyHighlightingColorshook):ProjectRover/src/ProjectRover/TextView/DecompilerTextView.axaml.cs:1759ProjectRover/src/ProjectRover/TextView/DecompilerTextView.axaml.cs:1923
- Decompile output still assigns language highlighting definition to editor:
ProjectRover/src/ProjectRover/TextView/DecompilerTextView.axaml.cs:1111
- Decompiled syntax coloring is now driven by ILSpy highlighting +
ThemeManager.ApplyHighlightingColors(WPF-equivalent), not TextMate theme names. - Current/line/link editor resources are still bound from theme resource keys:
ProjectRover/src/ProjectRover/TextView/DecompilerTextView.axaml.cs:327
- Hover flow mirrors WPF: resolve reference segment, build tooltip content via
DocumentationUIBuilder, show popup:ProjectRover/src/ProjectRover/TextView/DecompilerTextView.axaml.cs:743ProjectRover/src/ProjectRover/TextView/DecompilerTextView.axaml.cs:752ProjectRover/src/ProjectRover/TextView/DecompilerTextView.axaml.cs:820
- Popup styling uses resource keys
ToolTipBackgroundBrush/ToolTipBorderBrushwith hardcoded fallback:ProjectRover/src/ProjectRover/Controls/TooltipPopup.cs:93ProjectRover/src/ProjectRover/Controls/TooltipPopup.cs:94
- App-level theme resources are currently provided via
ThemeDictionariesfor onlyLightandDark:ProjectRover/src/ProjectRover/App.axaml:67ProjectRover/src/ProjectRover/App.axaml:176
Target names (same as WPF) are now available in Rover:
LightDarkVS Code Light+VS Code Dark+R# LightR# Dark
Implemented:
- Theme surface/API expanded to 6 names (no 2-theme collapsing)
ProjectRover/src/ProjectRover/Themes/ThemeManagerShim.cs:22ProjectRover/src/ProjectRover/Themes/ThemeManagerShim.cs:31ProjectRover/src/ProjectRover/Themes/ThemeManagerShim.cs:168
- Menu commands now include all 6 theme entries
ProjectRover/src/ProjectRover/Commands/ThemeCommands.cs:78
- View-model theme picker now exposes all 6
ProjectRover/src/ProjectRover/MainWindowViewModel.cs:67
- Per-theme Avalonia resource dictionaries added and loaded dynamically
ProjectRover/src/ProjectRover/Themes/ThemeManagerShim.cs:190ProjectRover/src/ProjectRover/Themes/Theme.VSCodeLightPlus.axaml:1ProjectRover/src/ProjectRover/Themes/Theme.VSCodeDarkPlus.axaml:1ProjectRover/src/ProjectRover/Themes/Theme.RSharpLight.axaml:1ProjectRover/src/ProjectRover/Themes/Theme.RSharpDark.axaml:1
- Tooltip resource keys now exist in both app-level and per-theme resources
ProjectRover/src/ProjectRover/App.axaml:87ProjectRover/src/ProjectRover/App.axaml:198ProjectRover/src/ProjectRover/Controls/TooltipPopup.cs:93
- Decompiler TextMate wiring removed to keep decompiled highlighting source aligned with WPF (
SyntaxColor.*via theme manager).ProjectRover/src/ProjectRover/TextView/DecompilerTextView.axaml.cs
SyntaxColor.* support is now implemented in Rover:
- Rover stores
SyntaxColor.<Language>.*entries directly in RoverTheme.*.axamlfiles asthemes:SyntaxColorResource(no WPF theme file dependency).ProjectRover/src/ProjectRover/Themes/Theme.Light.axamlProjectRover/src/ProjectRover/Themes/Theme.Dark.axamlProjectRover/src/ProjectRover/Themes/Theme.VSCodeLightPlus.axamlProjectRover/src/ProjectRover/Themes/Theme.VSCodeDarkPlus.axamlProjectRover/src/ProjectRover/Themes/Theme.RSharpLight.axamlProjectRover/src/ProjectRover/Themes/Theme.RSharpDark.axaml
ThemeManagerShimnow caches parsed syntax-color mappings per selected theme and applies them to named highlighting colors (same prefix logic as WPF).ProjectRover/src/ProjectRover/Themes/ThemeManagerShim.cs
- Highlighting refresh is triggered for open editors when theme changes.
ProjectRover/src/ProjectRover/Themes/ThemeManagerShim.csProjectRover/src/ProjectRover/TextView/DecompilerTextView.axaml.cs:1778
- A dark-theme fallback conversion path remains in place only when syntax-color mappings cannot be loaded/applied.
- Visual equivalence still needs manual tuning/verification for each of the 6 themes across editor + tooltip scenarios.
- Decompiler no longer blends
SyntaxColor.*with TextMate theme tokenization; remaining differences are mostly brush/value tuning and Avalonia rendering differences. - No automated UI regression check yet validates token colors for all languages/themes.