Add a headless widget gallery tool and generated gallery images - #521
Merged
Merged
Conversation
tools/WidgetGallery renders every widget in ktsu.ImGui.Widgets alone in a headless harness, crops each to what it drew, and composites the tiles into captioned gallery images grouped by the README's feature list. A --check mode reports any ImGuiWidgets member without a tile, so widgets that land later are flagged rather than silently missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K7xbLYjN86afX9oQFeVxnA
One PNG per widget under docs/gallery/widgets, plus the full gallery and one sheet per feature group, all rendered by tools/WidgetGallery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K7xbLYjN86afX9oQFeVxnA
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K7xbLYjN86afX9oQFeVxnA
Adds WidgetGallery.UITests, which runs the tool end to end. Draws composite tiles through ImGuiWidgets.Image instead of an unsafe block, splits Main and the dialog-button search to bring their complexity down, and recreates the sample folder when a second run in one process finds it deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K7xbLYjN86afX9oQFeVxnA
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K7xbLYjN86afX9oQFeVxnA
|
This was referenced Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Before: there were no pictures of the widgets for the README, and nothing kept a gallery in step with the widget library.
After:
dotnet run -c Release --project tools/WidgetGalleryrenders every widget inktsu.ImGui.Widgetsheadlessly and writes the results todocs/gallery/:widgets/widgets.pngwidgets-<group>.png--checkfails when anImGuiWidgetsmember has no tile, so a new widget needs a gallery entry alongside its demo and isolation suite. CLAUDE.md now says so.How: each tile renders on its own through
ImGuiAppHarnesswith the application's Nerd Font and with Material Icons merged in. The crop is the union of the widget's item rectangle and its pixel difference against a baseline frame. Dialog tiles close themselves so that Hexa's static managers don't leak into the next tile. The composites are laid out in C# and drawn by ImGui itself. Tiles live intools/WidgetGallery/Catalog/, one file per feature group. The 66 tiles are committed via LFS, and a rerun changes only the tiles whose widgets changed.Known caveats:
🤖 Generated with Claude Code
https://claude.ai/code/session_01K7xbLYjN86afX9oQFeVxnA
Generated by Claude Code