Browse Source

Lighter column-header hover, arrow cursor in filter popup

Two readability fixes for the metadata grid:
- Override DataGridColumnHeaderHoveredBackgroundBrush / Pressed to the toolbar accent
  palette so the Simple theme's saturated dark fill stops burying header text while
  sorting / resizing.
- Force StandardCursorType.Arrow on the filter popup's root Border. Without it the
  EW-resize cursor set by the column header's drag-grip can leak into the popup if
  the pointer enters from there before Avalonia recomputes the cursor.

Assisted-by: Claude:claude-opus-4-7:Claude Code
pull/3755/head
Siegfried Pammer 2 months ago
parent
commit
f03b4bfe9d
  1. 7
      ILSpy/App.axaml
  2. 5
      ILSpy/Metadata/MetadataColumnBuilder.cs

7
ILSpy/App.axaml

@ -26,6 +26,13 @@ @@ -26,6 +26,13 @@
<!-- Suppress the gray pointer-over highlight on rows and cells. -->
<SolidColorBrush x:Key="DataGridRowHoveredBackgroundBrush" Color="Transparent" />
<SolidColorBrush x:Key="DataGridCellHoveredBackgroundBrush" Color="Transparent" />
<!-- Replace the Simple theme's saturated dark fill on column-header hover/press
with the toolbar accent palette (#330078D7 hover, #660078D7 pressed). The
default makes header text unreadable while sorting / resizing; the lighter
translucent accent matches MainToolBar.axaml's button hover treatment. -->
<SolidColorBrush x:Key="DataGridColumnHeaderHoveredBackgroundBrush" Color="#330078D7" />
<SolidColorBrush x:Key="DataGridColumnHeaderPressedBackgroundBrush" Color="#660078D7" />
</Application.Resources>
<Application.DataTemplates>

5
ILSpy/Metadata/MetadataColumnBuilder.cs

@ -182,6 +182,11 @@ namespace ILSpy.Metadata @@ -182,6 +182,11 @@ namespace ILSpy.Metadata
BorderBrush = Brushes.Gray,
BorderThickness = new Thickness(1),
Background = Brushes.White,
// Force the arrow cursor on the popup surface — without this, the
// EW-resize cursor set on the DataGrid column header's drag-grip can
// leak into the popup if the pointer enters from there before
// Avalonia recomputes the cursor for the new hit-test target.
Cursor = new global::Avalonia.Input.Cursor(global::Avalonia.Input.StandardCursorType.Arrow),
Child = new ScrollViewer {
MaxHeight = 400,
Content = popupContent,

Loading…
Cancel
Save