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:
+54
-5
@@ -1,6 +1,7 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace ytLive.Models;
|
||||
|
||||
@@ -10,8 +11,44 @@ public class Scene : INotifyPropertyChanged
|
||||
|
||||
private string _name = string.Empty;
|
||||
private bool _isHidden;
|
||||
private bool _hasBackdrop;
|
||||
private bool _hasBackground;
|
||||
private bool _hasSocialBar;
|
||||
private bool _isStaged;
|
||||
private bool _isLive;
|
||||
private string? _customBackgroundPath;
|
||||
private bool _useDefaultBackground = true;
|
||||
|
||||
public bool IsStaged
|
||||
{
|
||||
get => _isStaged;
|
||||
set => Set(ref _isStaged, value);
|
||||
}
|
||||
|
||||
public bool IsLive
|
||||
{
|
||||
get => _isLive;
|
||||
set => Set(ref _isLive, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User-selected background image file path (FQFN). Null means use the app default.
|
||||
/// Stored as a reference only — the image file is not copied into the DB.
|
||||
/// </summary>
|
||||
public string? CustomBackgroundPath
|
||||
{
|
||||
get => _customBackgroundPath;
|
||||
set => Set(ref _customBackgroundPath, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When true, the shipped default background image is used and CustomBackgroundPath
|
||||
/// is ignored (but preserved). Toggled by the pill-switch in the properties panel.
|
||||
/// </summary>
|
||||
public bool UseDefaultBackground
|
||||
{
|
||||
get => _useDefaultBackground;
|
||||
set => Set(ref _useDefaultBackground, value);
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
@@ -26,13 +63,13 @@ public class Scene : INotifyPropertyChanged
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether the scene has a live desktop/game backdrop layer. Enforced by
|
||||
/// Whether the scene has a live desktop/game background layer. Enforced by
|
||||
/// policy: only the canonical Live scene ever has one (see SceneCatalog).
|
||||
/// </summary>
|
||||
public bool HasBackdrop
|
||||
public bool HasBackground
|
||||
{
|
||||
get => _hasBackdrop;
|
||||
set => Set(ref _hasBackdrop, value);
|
||||
get => _hasBackground;
|
||||
set => Set(ref _hasBackground, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -56,6 +93,18 @@ public class Scene : INotifyPropertyChanged
|
||||
|
||||
public bool IsChatScene { get; init; }
|
||||
|
||||
private BitmapSource? _snapshot;
|
||||
|
||||
/// <summary>
|
||||
/// Cached thumbnail snapshot of this scene for the control surface strip.
|
||||
/// Updated by the compositor when the scene is not live-previewed.
|
||||
/// </summary>
|
||||
public BitmapSource? Snapshot
|
||||
{
|
||||
get => _snapshot;
|
||||
set => Set(ref _snapshot, value);
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
private void Set<T>(ref T field, T value, [CallerMemberName] string? propertyName = null)
|
||||
|
||||
Reference in New Issue
Block a user