mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
Simple theme ships no Dark resource dictionary, so flipping RequestedThemeVariant alone is a no-op against any surface whose brushes are hardcoded or pulled from a Simple key. We can't swap themes (Simple is the deliberate visual identity), but we can layer our own ThemeDictionaries on top so the surfaces ILSpy owns directly respond to View > Theme. Introduce a single block of Light / Dark brush pairs under Application.Resources.ThemeDictionaries (App.axaml), then route the hardcoded brushes in the editor view, the toolbar, the zoom overlay, and tooltips through DynamicResource lookups against those keys. Surfaces wired: - Decompiler text view background and wait-adorner overlay. - Main toolbar background, bottom border, separator hairlines, combobox border, and the disabled-button content fills. - Zoom-buttons overlay background and border. - Tooltips (background, foreground, border) via a Style selector since Simple paints them via hardcoded setters that don't expose a brush key. Simple-themed chrome (menu, tree, scrollbars, status bar, dock splitters) remains Light in both variants. That's partial dark mode by design -- covering it requires either swapping to Fluent (which costs the Simple visual identity, and a separate test showed the chrome regressing under Fluent) or redeclaring every Simple resource key per variant, which is a much larger effort. Follow-ups will extend coverage one surface at a time. Light values match what each file shipped (no visible diff in the default theme). Dark values follow the VS-style palette: editor #1E1E1E toolbar #2D2D30 border #3F3F46 tooltip #252526 border #3F3F46 foreground #DCDCDC zoom overlay #E01E1E1E with translucent gray border Assisted-by: Claude:claude-opus-4-7:Claude Codepull/3755/head
4 changed files with 89 additions and 36 deletions
Loading…
Reference in new issue