From 85965d05dc5c41ad6001a70db2490998ecc757db Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 4 Jun 2026 20:17:16 +0200 Subject: [PATCH] Improve selected-text highlighting in the decompiler view Ports icsharpcode/ILSpy#2938. Selected text kept the run's syntax colours by leaving the AvaloniaEdit TextArea SelectionForeground unset, and the selection is drawn as a flat, translucent highlight (square corners) rather than an opaque recolour. The brush is theme-aware -- #007ACC at 30% on the light editor background, a brighter #3794FF at 35% so it still reads on the dark one. --- ILSpy/App.axaml | 6 ++++++ ILSpy/TextView/DecompilerTextView.axaml | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/ILSpy/App.axaml b/ILSpy/App.axaml index 1142f6ad1..b035c574d 100644 --- a/ILSpy/App.axaml +++ b/ILSpy/App.axaml @@ -38,6 +38,9 @@ surfaces a reader spends most time looking at. --> + + @@ -86,6 +89,9 @@ + + diff --git a/ILSpy/TextView/DecompilerTextView.axaml b/ILSpy/TextView/DecompilerTextView.axaml index 9f163fc9b..627108627 100644 --- a/ILSpy/TextView/DecompilerTextView.axaml +++ b/ILSpy/TextView/DecompilerTextView.axaml @@ -3,12 +3,23 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ae="using:AvaloniaEdit" + xmlns:aeediting="using:AvaloniaEdit.Editing" xmlns:textView="using:ILSpy.TextView" mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="400" Name="self" x:Class="ILSpy.TextView.DecompilerTextView" x:DataType="textView:DecompilerTabPageModel"> + + + + +