From f236eae4345508af9fbc6a0094fe5c7ca705b2f4 Mon Sep 17 00:00:00 2001 From: EmoSaru Date: Sun, 10 May 2026 12:23:06 -0700 Subject: [PATCH 1/2] Fix TabPanel: tab strip hidden by content overflow and ignores h_alignment 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 --- EmoTracker/UI/LayoutControl.axaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/EmoTracker/UI/LayoutControl.axaml b/EmoTracker/UI/LayoutControl.axaml index 1eda33e..c3ab880 100644 --- a/EmoTracker/UI/LayoutControl.axaml +++ b/EmoTracker/UI/LayoutControl.axaml @@ -264,9 +264,12 @@ + From a686bd6b0bacf257e3ec054e339856bd7946b1e8 Mon Sep 17 00:00:00 2001 From: EmoSaru Date: Sun, 10 May 2026 12:45:41 -0700 Subject: [PATCH 2/2] Add tabstrip_h_alignment to TabPanel; decouple tab strip from control 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 --- EmoTracker.Data/Layout/TabPanel.cs | 8 ++++++++ EmoTracker/UI/LayoutControl.axaml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/EmoTracker.Data/Layout/TabPanel.cs b/EmoTracker.Data/Layout/TabPanel.cs index e735a72..1ce919b 100644 --- a/EmoTracker.Data/Layout/TabPanel.cs +++ b/EmoTracker.Data/Layout/TabPanel.cs @@ -84,6 +84,14 @@ public override ModelTypeBase Fork(ITrackerStateContext destOwnerState) } } + [KVOverridable] + public partial HorizontalAlignment TabStripHorizontalAlignment { get; set; } + + protected override void PopulateDefinitionData(Newtonsoft.Json.Linq.JObject data, IGamePackage package, System.Collections.Generic.Dictionary definition) + { + definition[nameof(TabStripHorizontalAlignment) + "__def"] = data.GetEnumValue("tabstrip_h_alignment", HorizontalAlignment.Center); + } + ObservableCollection mTabs = new ObservableCollection(); public IEnumerable Tabs diff --git a/EmoTracker/UI/LayoutControl.axaml b/EmoTracker/UI/LayoutControl.axaml index c3ab880..ad5d2dd 100644 --- a/EmoTracker/UI/LayoutControl.axaml +++ b/EmoTracker/UI/LayoutControl.axaml @@ -269,7 +269,7 @@