From f6d7638441609d61f3cffec895fd479213f49723 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 15 Jun 2026 19:00:49 +0200 Subject: [PATCH] Use a thin auto-hiding overlay scrollbar for the omnibar breadcrumb When a breadcrumb path was longer than the bar, the Simple theme's horizontal scrollbar appeared in a reserved layout row inside the 28px bar: it shifted the crumbs up when it showed and covered more than half the bar's height. Three ways to handle the overflow were considered: 1. Collapse the head into an "..." overflow dropdown (leading crumbs fold into a left button; the deepest crumbs stay visible) - the Windows Explorer / VS nav-bar / Files behaviour. 2. Hide the scrollbar entirely and scroll the trail with the mouse wheel, keeping the current-node end visible. 3. [CHOSEN] A thin, auto-hiding overlay scrollbar that draws over the content (reserves no height, so nothing shifts) and fades in only when the path overflows and the pointer is over the bar. Avalonia's Simple ScrollViewer reserves an Auto grid row for the horizontal scrollbar and its ScrollBar has no auto-hide, so the overlay is built here: the breadcrumb's built-in bar is hidden (no reserved row, no shift) and a thin, button-less ScrollBar is layered at the bottom, bound to the viewer's Offset, ScrollBarMaximum, and Viewport via small Vector/Size converters. It fades in on pointer-over and the mouse wheel scrolls the trail horizontally. Assisted-by: Claude:claude-opus-4-8:Claude Code --- ILSpy/App.axaml | 2 + ILSpy/Controls/Omnibar/Omnibar.axaml | 73 +++++++++++++++++- ILSpy/Controls/Omnibar/Omnibar.axaml.cs | 16 ++++ .../Omnibar/OmnibarScrollConverters.cs | 76 +++++++++++++++++++ 4 files changed, 163 insertions(+), 4 deletions(-) create mode 100644 ILSpy/Controls/Omnibar/OmnibarScrollConverters.cs diff --git a/ILSpy/App.axaml b/ILSpy/App.axaml index 23c7988d0..4d50c7f1f 100644 --- a/ILSpy/App.axaml +++ b/ILSpy/App.axaml @@ -95,6 +95,7 @@ + @@ -152,6 +153,7 @@ + diff --git a/ILSpy/Controls/Omnibar/Omnibar.axaml b/ILSpy/Controls/Omnibar/Omnibar.axaml index 221e38527..47b47be9c 100644 --- a/ILSpy/Controls/Omnibar/Omnibar.axaml +++ b/ILSpy/Controls/Omnibar/Omnibar.axaml @@ -9,7 +9,57 @@ x:DataType="omnibar:OmnibarViewModel" Name="self"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +