From 7c7c17ca77016b0475be9e0f8234482c12a9d0cd Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 29 May 2026 00:05:29 +0200 Subject: [PATCH] Author manual Light/Dark brushes for the surfaces ILSpy paints itself 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 Code --- ILSpy/App.axaml | 105 ++++++++++++++++++------ ILSpy/TextView/DecompilerTextView.axaml | 4 +- ILSpy/TextView/ZoomButtons.axaml | 4 +- ILSpy/Views/MainToolBar.axaml | 12 +-- 4 files changed, 89 insertions(+), 36 deletions(-) diff --git a/ILSpy/App.axaml b/ILSpy/App.axaml index c71939938..6d539b7f0 100644 --- a/ILSpy/App.axaml +++ b/ILSpy/App.axaml @@ -19,33 +19,74 @@ - - - - - 13 - 5 - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 13 + 5 + + + + + + + + + + + + + @@ -67,6 +108,16 @@ + + +