Map every ImGuiCol slot in ImGuiPaletteMapper - #122
Merged
Merged
Conversation
Thirteen ImGuiCol slots had no mapping, so applying a theme left them at the previous style's values. Light themes kept StyleColorsDark's white text cursor and navy dimmed tabs. The slots are now mapped from the semantic palette, and the two dimming overlays get translucent alpha. A new test asserts that every ImGuiCol below Count is assigned for every theme, which comparing themes against each other could not catch. Fixes #110 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ErXBgrjdbMZYoULNa1H7n
|
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.



Fixes #110
Before:
ImGuiPaletteMapper.MapThemeleft 13ImGuiColslots unmapped, so they kept the previous style's values. Light themes applied overStyleColorsDark()had a white text cursor on light input frames and dark navy tabs in unfocused windows.After: every slot below
ImGuiCol.Countis mapped, as the issue suggests:InputTextCursorTextTextLink,NavCursor,DragDropTarget,DockingPreview,TabSelectedOverline,TabDimmedSelectedOverlineTabDimmedTabDimmedSelectedTreeLinesSeparatorDockingEmptyBgWindowBgNavWindowingDimBg,ModalWindowDimBgThe alpha comes from a small
alphaOverridestable applied during the conversion toVector4. Every other slot stays opaque.Tests (
ImGuiPaletteMapperTests):MapTheme_AssignsEveryImGuiColorchecks that everyImGuiColbelowCountis present for every theme. The existing size-equality test can't catch a slot that every theme is missing.MapTheme_InputTextCursorMatchesTextMapTheme_DimBackgroundsAreTranslucentAll three fail on
main(first failure:Catppuccin Latte: missing ImGui color InputTextCursor) and pass with the change. The fullThemeProvider.Testsuite passes locally on net10.0 in Release.🤖 Generated with Claude Code
https://claude.ai/code/session_015ErXBgrjdbMZYoULNa1H7n
Generated by Claude Code