diff --git a/Controls/PreviewPane.xaml b/Controls/PreviewPane.xaml index fc61496..17a4d08 100644 --- a/Controls/PreviewPane.xaml +++ b/Controls/PreviewPane.xaml @@ -351,10 +351,18 @@ - + + + + diff --git a/ViewModels/MainViewModel.Socials.cs b/ViewModels/MainViewModel.Socials.cs index 2a3da84..b713db3 100644 --- a/ViewModels/MainViewModel.Socials.cs +++ b/ViewModels/MainViewModel.Socials.cs @@ -35,8 +35,11 @@ public partial class MainViewModel /// so the two cannot drift apart (creator request 2026-10-30). public SolidColorBrush SocialBarTextBrush => SocialBarStyle.From(_socials).TextBrush; - /// The preview's plate: same colour AND same opacity the renderer bakes in. - public SolidColorBrush SocialBarBackgroundBrush => SocialBarStyle.From(_socials).BackgroundBrush; + /// The preview's plate: same colour AND same opacity the renderer bakes in. + /// Transparent when the plate is off — "off" means no plate, never no bar. + public SolidColorBrush SocialBarBackgroundBrush => _socials?.BarBackgroundEnabled == true + ? SocialBarStyle.From(_socials).BackgroundBrush + : Brushes.Transparent; /// The global socials config (entries + bar settings), or null. public SocialsConfig? Socials => _socials; diff --git a/ytLive.Tests/SocialBarAppearanceTests.cs b/ytLive.Tests/SocialBarAppearanceTests.cs index 350c58f..b85db0e 100644 --- a/ytLive.Tests/SocialBarAppearanceTests.cs +++ b/ytLive.Tests/SocialBarAppearanceTests.cs @@ -65,6 +65,20 @@ public class SocialBarAppearanceTests Assert.Null(failure); } + [Fact] + public void The_preview_bar_is_never_hidden_by_the_plate_switch() + { + // Regression, 2026-10-30: the plate Border wrapped the whole bar and its Visibility was + // bound to BarBackgroundEnabled, so turning the plate off (the default) removed the bar + // from the preview entirely. "Plate off" must mean a transparent plate. + var preview = SourceAssert.Text("Controls", "PreviewPane.xaml"); + Assert.DoesNotContain("Socials.BarBackgroundEnabled, Converter={StaticResource BoolToVis}", preview); + Assert.Contains("{Binding SocialBarBackgroundBrush}", preview); + + // The plate's PADDING is what switches with the toggle, not the element's presence. + Assert.Contains("", preview); + } + private static VideoFrame? Render(SocialBarStyle style) => SocialBarRenderer.Render(Entries, style); private static int Count(VideoFrame frame, Func predicate)