Skip to content

Give the selected tab its own fill on the tab bar [patch] - #163

Merged
matt-edmondson merged 2 commits into
mainfrom
fix/161-selected-tab-matches-title-bar
Nov 4, 2026
Merged

matt-edmondson merged 2 commits into
mainfrom
fix/161-selected-tab-matches-title-bar

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #161

Problem

ImGui fills a dock node's tab bar with TitleBgActive when it is focused and TitleBg when it isn't, and draws the selected tab with TabSelected / TabDimmedSelected. The mapper gave each selected-tab slot the same request as the bar under it (Primary / VeryLow and Neutral / Low). So in all 38 themes the selected tab had no fill of its own, and only the unselected tabs stood out.

Change

Slot Before After
TabSelected Primary / VeryLow (= TitleBgActive) Primary / Low
TabHovered Primary / Low Primary / MediumLow
TabDimmedSelected Neutral / Low (= TitleBg) Neutral / MediumLow

In both focus states the selected tab now sits one priority step above the bar, and unselected tabs keep their existing colours. TabHovered moves up one step so hovering a tab still looks different from selecting it. The new fills use the same steps as ButtonHovered/ButtonActive and FrameBgHovered, which already carry body text.

New test MapTheme_SelectedTabsDifferFromTheirTabBar checks TabSelected != TitleBgActive, TabDimmedSelected != TitleBg and TabHovered != TabSelected for every registered theme.

This edits the same file as #162 (the fix for #160), but in different hunks.

Verification

  • With the mapper change reverted, the new test fails (Catppuccin Latte: TabSelected is drawn in the TitleBgActive color).
  • With the change, the full ThemeProvider.Test suite passes: 90/90.

Generated by Claude Code

ImGui fills a dock node's tab bar with TitleBgActive or TitleBg, and
TabSelected and TabDimmedSelected resolved to those same colors, so the
selected tab had no fill of its own while unselected tabs stood out.
The selected tabs now sit one priority step above their bar, and
TabHovered moves up a step so hovering still reads differently from
being selected.

Fixes #161

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vfJW5kPDQWGc94xTwvzds
…matches-title-bar

# Conflicts:
#	ThemeProvider.Test/ImGuiPaletteMapperTests.cs
@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit 8aca75b into main Nov 4, 2026
16 checks passed
@matt-edmondson
matt-edmondson deleted the fix/161-selected-tab-matches-title-bar branch November 4, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants