From 4fd7946e2baefeb05051862bc721477cbffdeb4b Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 29 Jul 2026 18:00:04 +0200 Subject: [PATCH] Give the row-details text blob a minimum height A one-line payload (short hex dump, tiny source-link document) rendered as a squeezed strip barely taller than the row itself, which does not read as an expandable details area. Floor the editor at 100px so the details region stays visually recognisable regardless of payload size. Assisted-by: Claude:claude-fable-5:Claude Code --- ILSpy.Tests/Metadata/MetadataRowDetailsTests.cs | 1 + ILSpy/Metadata/MetadataRowDetails.cs | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ILSpy.Tests/Metadata/MetadataRowDetailsTests.cs b/ILSpy.Tests/Metadata/MetadataRowDetailsTests.cs index 2f0ec9282..061058f4e 100644 --- a/ILSpy.Tests/Metadata/MetadataRowDetailsTests.cs +++ b/ILSpy.Tests/Metadata/MetadataRowDetailsTests.cs @@ -186,6 +186,7 @@ public class MetadataRowDetailsTests editor.IsReadOnly.Should().BeTrue(); editor.WordWrap.Should().BeTrue(); editor.MaxHeight.Should().Be(400, "the host row must stay bounded; the editor scrolls internally"); + editor.MinHeight.Should().Be(100, "a short payload must still get a recognisable details area, not a squeezed strip"); editor.SyntaxHighlighting.Should().NotBeNull(); editor.SyntaxHighlighting!.Name.Should().Be("C#"); diff --git a/ILSpy/Metadata/MetadataRowDetails.cs b/ILSpy/Metadata/MetadataRowDetails.cs index a0bc9607a..a9c584e0d 100644 --- a/ILSpy/Metadata/MetadataRowDetails.cs +++ b/ILSpy/Metadata/MetadataRowDetails.cs @@ -121,8 +121,10 @@ namespace ICSharpCode.ILSpy.Metadata /// in the decompiler-view-styled AvaloniaEdit editor: text payloads are mostly code, /// so they get syntax colours (selected by , /// e.g. ".cs" or ".json"; stays plain) and line virtualization - /// keeps large embedded-source documents cheap. Height is bounded so the host row - /// cannot grow unbounded; the editor scrolls internally. + /// keeps large embedded-source documents cheap. Height is bounded in both directions: + /// capped so the host row cannot grow unbounded (the editor scrolls internally), and + /// floored so a short payload still reads as a details area rather than a squeezed + /// one-line strip. /// public static Control BuildTextBlob(string text, string? highlightExtension = null) { @@ -131,6 +133,7 @@ namespace ICSharpCode.ILSpy.Metadata Text = text, IsReadOnly = true, WordWrap = true, + MinHeight = 100, MaxHeight = 400, }; if (highlightExtension != null)