Fix TabPanel: tab strip hidden by content and ignores h_alignment (#86)#87
Merged
Conversation
…nment Two bugs in the TabControl ControlTemplate: 1. Z-order: the global ClipToBounds=False style allows content in Grid Row=1 to overflow upward, visually covering the tab header strip in Row=0 (reproducible with a scroll layout inside a tabbed layout). Fix: set ZIndex=1 on the ItemsPresenter so the strip always renders on top of any overflowing content. 2. Alignment: the ItemsPresenter had HorizontalAlignment hardcoded to Center, so the tab strip ignored the layout's h_alignment setting. Fix: bind HorizontalAlignment to the TabPanel data model via TrivialEnumConverter, matching how every other LayoutItem applies it. Closes #86 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… alignment Introduces TabStripHorizontalAlignment (JSON: tabstrip_h_alignment, default: center) so pack authors can independently control where the tab header strip sits within the TabControl, while h_alignment continues to position the TabControl itself in its parent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Fixes two bugs in the
TabControltemplate inLayoutControl.axaml, both reported in issue #86:Tab strip covered by content — The global
ClipToBounds=Falsestyle allows child content (e.g. a scroll layout) to overflow upward out of its grid row, visually hiding the tab header strip above it. Fixed by settingZIndex="1"on theItemsPresenterso the tab strip always renders on top of any overflowing content.h_alignmentignored — TheItemsPresenterhadHorizontalAlignmenthardcoded toCenter, so the layout'sh_alignmentJSON field had no effect on the tab strip. Fixed by bindingHorizontalAlignmentto theTabPaneldata model viaTrivialEnumConverter, matching how every otherLayoutItemapplies the same property.Test plan
h_alignmenttoleft,center, andrighton a tabbed layout and confirm the tab strip aligns accordingly on a single row🤖 Generated with Claude Code