Control Surface UX: pill toggle, background rename, per-scene properties

- Sliding pill toggle (green ON / red OFF) replaces checkbox
- Geometry mismatch error for custom backgrounds
- Backdrop -> Background: C# rename, SQL column rename with migration
- Source.IsBackground: new -> override (fixes WPF binding)
- Legacy 'Backdrop' display name migrated to 'Background'
- Per-scene UseDefaultBackground + CustomBackgroundPath
- Asset files renamed backdrop -> background
- StagedScene/LiveScene split, thumbnail strip, edit gating
- TransitionService (Cut/Fade/Move)
- Context menu: Capture Desktop, Refresh Desktop
- Resolution badge removed, ON-AIR status light added
This commit is contained in:
2026-08-22 18:10:59 -07:00
parent e06bfa42a8
commit 4b9a8e515f
35 changed files with 1406 additions and 717 deletions
+21 -21
View File
@@ -7,7 +7,7 @@ namespace ytLive.Tests;
/// <summary>
/// The app is a five-scene product: Starting/Live/BRB/Chat/Ending. Scenes are
/// worked on by name; you can delete them but never add beyond the set, and the
/// live backdrop belongs to Live alone.
/// live background belongs to Live alone.
/// </summary>
public class SceneCatalogTests
{
@@ -40,38 +40,38 @@ public class SceneCatalogTests
[InlineData("BRB", false)]
[InlineData("Chat", false)]
[InlineData("Ending", false)]
public void SceneCatalog_HasBackdrop_Only_For_Live(string name, bool expected)
public void SceneCatalog_HasBackground_Only_For_Live(string name, bool expected)
{
Assert.Equal(expected, SceneCatalog.HasBackdrop(name));
Assert.Equal(expected, SceneCatalog.HasBackground(name));
}
[Fact]
public void EnforceBackdropPolicy_Removes_Backdrop_From_NonLive_Scenes()
public void EnforceBackgroundPolicy_Removes_Background_From_NonLive_Scenes()
{
var chat = new Scene { Name = "Chat", HasBackdrop = true };
var live = new Scene { Name = "Live", HasBackdrop = true };
var chatBackdrop = MainViewModel.EnsureBackdrop(chat)!;
var liveBackdrop = MainViewModel.EnsureBackdrop(live)!;
Assert.Contains(chat.Elements, e => ReferenceEquals(e, chatBackdrop));
var chat = new Scene { Name = "Chat", HasBackground = true };
var live = new Scene { Name = "Live", HasBackground = true };
var chatBackground = MainViewModel.EnsureBackground(chat)!;
var liveBackground = MainViewModel.EnsureBackground(live)!;
Assert.Contains(chat.Elements, e => ReferenceEquals(e, chatBackground));
MainViewModel.EnforceBackdropPolicy(new[] { chat, live });
MainViewModel.EnforceBackgroundPolicy(new[] { chat, live });
Assert.False(chat.HasBackdrop);
Assert.DoesNotContain(chat.Elements, e => e is Source { IsBackdrop: true });
Assert.True(live.HasBackdrop);
Assert.Contains(live.Elements, e => ReferenceEquals(e, liveBackdrop));
Assert.False(chat.HasBackground);
Assert.DoesNotContain(chat.Elements, e => e is Source { IsBackground: true });
Assert.True(live.HasBackground);
Assert.Contains(live.Elements, e => ReferenceEquals(e, liveBackground));
}
[Fact]
public void EnforceBackdropPolicy_Marks_Live_And_Clears_A_Pre_Policy_Database()
public void EnforceBackgroundPolicy_Marks_Live_And_Clears_A_Pre_Policy_Database()
{
var starting = new Scene { Name = "Starting", HasBackdrop = true };
MainViewModel.EnsureBackdrop(starting);
var live = new Scene { Name = "Live", HasBackdrop = false };
var starting = new Scene { Name = "Starting", HasBackground = true };
MainViewModel.EnsureBackground(starting);
var live = new Scene { Name = "Live", HasBackground = false };
MainViewModel.EnforceBackdropPolicy(new[] { starting, live });
MainViewModel.EnforceBackgroundPolicy(new[] { starting, live });
Assert.False(starting.HasBackdrop);
Assert.True(live.HasBackdrop);
Assert.False(starting.HasBackground);
Assert.True(live.HasBackground);
}
}