Skip to content

Fix the widget gallery tiles and four widget defects they exposed - #610

Merged
matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-4d94d3
Oct 10, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-4d94d3

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Requested by Matt in a Claude project thread.

Before: In the widget gallery, Material Icons glyphs came out as Nerd Font glyphs, so the file dialogs, tree and date picker showed the wrong icons. Many tiles had text touching their edges. Several tiles showed the widget doing nothing useful:

  • an asset browser with no assets
  • a collapsed file tree
  • a closed date picker
  • ranked search listing non-matches
  • sequencer clips scrolled out of view
  • labels overlapped by hitches and playheads

Reviewing what each widget actually did turned up four defects in the widgets themselves:

  • EnvelopeEditor: clipped the handles on its edges in half.
  • PianoKeyboard: drew the octave label on a held key in the disabled colour, so it disappeared into the highlight.
  • FontHelper: had no Superscripts and Subscripts range, so ⁻ and ⁴ rendered as boxes.
  • Spinner: drew half its stroke left of the cursor and past its item.

After: Every gallery tile shows its widget working, with padding and captions. Each of the four defects is fixed and has a regression test:

  • EnvelopeEditor_HandlesOnTheEdgeAreDrawnWhole
  • PianoKeyboard_TheLabelOnAHeldCIsReadable
  • FontHelper_ExtendedRanges_IncludeSuperscripts
  • Spinner_DrawsItsWholeStrokeInsideItsItem

Each test fails without its fix. SearchBoxRanked's return value doc now says it returns the ranked list rather than only the matches; that behaviour is by design.

How:

  • Fonts: the gallery excludes the Private Use Area from the Nerd Font (GlyphExcludeRanges) and merges Material Symbols Outlined. The workflow pins it by commit and sha256.
  • Tiles: staged through the existing catalog helpers. The file pickers get a fixed set of sample drives (SampleDrives.cs) so the pictures are reproducible.
  • Spinner: the adapter insets the cursor by half the stroke and reserves the full extent in a group.
  • Filed CurveEditor(CurveData, ...) draws the curve line across 0..1 in x whatever rangeMin/rangeMax say, so the line and its points disagree #609: Hexa's CurveEditor draws its line over 0..1 in x whatever range it is given, so the line and its points disagree. The gallery stays at the unit range, where the bug does not show.

Tests: ImGui.Widgets.UITests (711), ImGui.App.Tests and WidgetGallery.UITests pass in Release, and --check passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWRBkw7bXdWGzuLpqnCvrB


Generated by Claude Code

Gallery: Material Symbols merges into the Private Use Area without the Nerd
Font shadowing it, and the dialog/tree glyphs render. Tiles get padding and
captions, and the following are staged to show what they do:
- the asset browser
- an expanded file tree and an open date picker
- ranked search matches
- sequencer clips that fit the visible frames
- clear transport and frame-time labels

Library fixes, each with a regression test:
- EnvelopeEditor draws its edge handles after popping the clip rect, so they
  are no longer cut in half.
- PianoKeyboard draws the octave label on a held key in the text colour, so
  it is readable on the highlight.
- FontHelper's symbol ranges include Superscripts and Subscripts.
- Spinner insets by half its stroke and reserves the stroke's width, so the
  arc no longer draws outside its item.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWRBkw7bXdWGzuLpqnCvrB
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants