From cb4f8ec75866241b8d25773c2246216134c6a619 Mon Sep 17 00:00:00 2001 From: gramps Date: Fri, 30 Oct 2026 10:46:51 -0700 Subject: [PATCH] fix(ui): REC / ON-AIR labels are white in every state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RecordPillToggle never set a base Foreground, and its label inherits the toggle's — so unchecked inherited the Control default (black) on the dark bar, while checked was white on red. The style now sets on-accent once; the checked trigger only changes the fill. That is the consistency rule for session controls: white ink always, the fill carries the state (neutral off, red live). EDIT follows the same rule. UiShellTests asserts the base foreground, so the missing setter cannot come back silently. --- Themes/Controls.xaml | 5 ++++- ytLive.Tests/UiShellTests.cs | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Themes/Controls.xaml b/Themes/Controls.xaml index ee70aa7..c46a5b2 100644 --- a/Themes/Controls.xaml +++ b/Themes/Controls.xaml @@ -757,6 +757,10 @@ + + @@ -770,7 +774,6 @@ - diff --git a/ytLive.Tests/UiShellTests.cs b/ytLive.Tests/UiShellTests.cs index 259b733..cb1212e 100644 --- a/ytLive.Tests/UiShellTests.cs +++ b/ytLive.Tests/UiShellTests.cs @@ -43,6 +43,11 @@ public class UiShellTests // 5. Armed session controls are red, and the running stop button is red — not a grey literal. Assert.Contains("x:Key=\"RecordPillToggle\"", theme); + // One rule for session controls: white ink in every state, the fill carries the state. + // The missing base foreground is what painted the REC/ON-AIR labels black (2026-10-30). + var pill = theme[theme.IndexOf("x:Key=\"RecordPillToggle\"", System.StringComparison.Ordinal)..]; + pill = pill[..pill.IndexOf("", System.StringComparison.Ordinal)]; + Assert.Contains("", pill); Assert.Contains("Brush.Primary", theme); Assert.Contains("Style=\"{StaticResource RecordPillToggle}\"", topBar); Assert.Contains("Background=\"{StaticResource Brush.Primary}\" Margin=\"14,0,0,0\"", topBar);